How To Pass Input(type = Text ) From A Html Form To Javascript Function
i want to pass the udid taken from textfield to function getusername. Enter Udid :
Solution 2:
Try this code:
In your html:
<inputtype="button" value="Get User Name(udid)" onclick="getUserName(document.getElementById('udid'));">
Function javascript:
function getUserName(id){
alert(id.value);
}
Look at this demo: JSFIDDLE
Post a Comment for "How To Pass Input(type = Text ) From A Html Form To Javascript Function"