Archive: September 2009

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;

That will make the [...]

  Copyright © 2009 All rights reserved.