There's no single correct answer, because it all depends on individual state laws. You are usually liable for state taxes in both locations. Depending on declared tax-reciprocity between states, you might be able to offset the liability for your residence state by showing the tax receipts for the work state. However, states usually set up reciprocity with neighbouring states only.
If your employer is using any kind of payroll software, it should be smart enough to take in to account all these types of conditions(your individual circumstances, exemptions, laws, etc), since tax laws in the US require recording of both residence and work tax locations. If not, be advised that you are probably liable for taxes both places. *Key word is probably*. Please confirm your situation with a qualified tax professional.