Thunder Lizard JavaScript Conference |
function chgBackground(newColor) { document.colorChg.bgColor = newColor } : : <style type="text/css"> #colorChg {position: relative} </style>
<div id="colorChg">Change my background color</div> <a href="javascript:chgBackground('red')">red</a> <a href="javascript:chgBackground('blue')">blue</a> <a href="javascript:chgBackground('green')">green</a>