I have a textbox and button in my page. I have several sets of the below for different purpose.
<input type="text" id="new" name="new" value="1" />
<input type="button" value="Edit" onclick="compute(edit(xxx));" />
Upon clicking on the button, I want to call a javascript function which will take in the value input in the textbox. Now I am wondering how am I suppose to retrieve the value from the input 'new' and pass it the 'xxx' as argument?
why you don't try this by Jquery it is to understand and easy to implement.
Jquery Documentation
your question Fiddle
Here
This is how you handle it there in the HTML.
Else you can write the same code in javaScript.
Try