0 votes
65 views
asked in java script by (2.6k points)
in my project i want to use the javascript variable in html page

any solution whould be appreciate..

1 Answer

0 votes
answered by (2.3k points)

i don't know it's possiable to pass the variable from js to html

but u can able to assign the js variable value into html text filed like this

 

your form element

<input type="text" id="mytext">

javascript

var test = "Hello";
document.getElementById("mytest").value = test;

Categories

...