Answers for "js code to take value from form and store it in a variable"

1

js code to take value from form and store it in a variable

function myfunction(){
  var element=document.getElementById("myformname").value;
  //what this statement does is it stores the value stored in the id myformname and the value is what was inputted by the user. 
  //similarly different ids can be used on form elements to store the different values that we receive in the form by the user.
}}
Posted by: Guest on March-19-2022

Code answers related to "js code to take value from form and store it in a variable"

Code answers related to "Javascript"

Browse Popular Code Answers by Language