Plug-in JavaScript Chapter 3, Example 14 (Click on the icon to view the source for copy and pasting)
» Run this code now (Right click and select Back to return from the example)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<html><head><title>Plug-in JavaScript: Example 14</title>

<script src="PJ.js"></script>


<div id='mydiv'>Example Text</div>


window.onload = function()
   S('mydiv').width           = Px(200)
   S('mydiv').height          = Px(100)
   S('mydiv').backgroundColor = 'green'
   S('mydiv').color           = 'white'
   S('mydiv').position        = 'absolute'

   alert("Click OK to see some changes")

   S('mydiv').backgroundColor = 'blue'
   S('mydiv').color           = 'yellow'
   S('mydiv').left            = Px(100)

   alert("Click OK to see them change back again")