|
Today I’m going to show you how to make a <div> = the contents of a javascript variable. It’s actually very simple to do!
First lets start with the <div>
<div id=”thediv”></div>
Now lets do the javascript. Areas you will need to change are in bold.
<script type=”text/javascript”>
var thevar = “This is a test“;
document.getElementById(’thediv‘).innerHTML = thevar;
</script>
That will make the [...]



