<input name="textbox1" id="textbox1" type="text" /> <button type="submit" onclick="javascript:myfunction(document.getElementById('textbox1').value)" >Submit</button>