Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to print the value of variable in javascript in html

var name="kieran";
document.getElementById("output").innerHTML=name;

and the html code would be: 

<p id="output"></p>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #print #variable #javascript #html
ADD COMMENT
Topic
Name
9+2 =