DHTML


Written on October 11, 2010 – 9:57 am | by Lachy

As you may have noticed, to your right there is a lightbulb widget that turns on and off when you click it.

This was created by using DHTML. This stands for Dynamic Hyper Text Markup Language.

This is a combination of ;

  • Javascript
  • XHTML
  • HTML
  • HTML DOM
  • CSS

If you wish to learn some of theseĀ I recommend w3schools.com.

Below you can find the coding for the light bulb.

You need to copy the below code into an empty text widget if youare using it in edublogs. Anywhere else you just paste it anywhere that accepts HTML text.

<html>
<head>
<script type=”text/javascript”>
blowup=0
cc=0;
function changelight()
{
if (cc==0)
{
cc=1;
document.getElementById(‘light’).src=”http://lac23.edublogs.org/files/2010/09/bulbon.gif”;
}
else
{
cc=0;
document.getElementById(‘light’).src=”http://lac23.edublogs.org/files/2010/09/bulboff.gif”;
}
}
</script>
</head>
<body>
<img src=”http://lac23.edublogs.org/files/2010/09/bulboff.gif” id=”light” onclick=”changelight()” />
<p>Click to turn on/off the light</p>
<p>This was created by <a href=”http://lac23.edublogs.org”>Lac23</a>
</body>
</html>



  1. No Responses to “DHTML”

Post a Comment

Skip to toolbar