<head>
<script language="JavaScript">
function function1(){
myDiv.style.position = "absolute";
}
</script>
</head>
<body>
<br>
<br>
<br>
<br>
<br>
<div id="myDiv"
style="background-color:#ccffcc;
width:300;
cursor:hand"
onclick="function1()">
Click Here to set the position to absolute
</div>
</body>