Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

insert value to html input with javascript variable

function product(a, b) {
   return a * b;
}
function setInputValue(input_id, val) {
    document.getElementById(input_id).setAttribute('value', val);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #insert #html #input #javascript #variable
ADD COMMENT
Topic
Name
9+3 =