If I have a much simplified JavaScript method such as this:
function myfunction() {
var i = 9;
}
Is there any way I can get the value of i into HTML such that when the web page with this method is called, the value 9 is displayed in a div or span element?
Hi 😀 you can try the following using JQuery:
or the classic old-fashion way:
I hope this helps.