How to pass Variable from External JavaScript to HTML Form
问题 I have been trying to pass a value from an external javascript file to an HTML form with no luck. The files are rather large so I am not sure I can explain it all but ill try. Basically a user clicks a link then a js file is initiated. Immediately after a new HTML page loads. I need this value passed to the HTML page in a form field. Javascript: var divElement = function(){ divCode = document.getElementById(div1).innerHTML; return divCode; }; document.getElementById('adcode').value =