> **Possible Duplicate:**
> [Unable to get textfield value using jQuery](https://stackoverflow.com/questions/13438570/unable-to-get-textfield-value-using-jquery)
i have a invoice where i am iterating values from a list. There i have textbox named `subtotal` , this textbox holds some number. And another textbox named `discountamt` ,in this textbox user will enter discount in number,which will be calated as `discountamt percentage subtotal` .i.e(`discountamt % subtotal`) eg. 10% of subtotal.
And the calculated amount should reduce from subtotal and should set in anther textbox named `overalltotal` .
Please see my below image which shows how my output should be...
![enter image description here]
Below is my code, where i am trying to implement this
Over All Total Amount:
**UPDATE Correct Answer:**
var linetotal = $('[name=subtotal]').val();
Please help me to solve this issue...
: http://i.stack.imgur.com/OUSMW.png Forgive the impertinence, but why are you allowing your users to set everything (i.e., because it's in an input field, what prevents them from changing the price or line total of book title Two to 0.00, or from setting a discount of 100%)? Also, since you're apparently calculating client-side, what event should trigger the calculation?
以上就是how to calculate values from one text box and set it to another textbox using jquery的详细内容，更多请关注web前端其它相关文章！