<SCRIPT>
function setClip(sOptionValue) {
oImage.style.clip="rect("+sOptionValue+",100,100,0)";
if (oImage.currentStyle.clipTop == "60px") {
alert("The image has been clipped to 60px.");
}
:
}
</SCRIPT>
:
<IMG ID=oImage SRC="/workshop/graphics/sphere.jpg">
:
Pick an amount to clip the top:
// the option value is sent as an argument:
<SELECT >
<OPTION VALUE=100>reset </OPTION>
<OPTION VALUE=40>40px </OPTION>
<OPTION VALUE=50>50px </OPTION>
<OPTION VALUE=60>60px </OPTION>
</SELECT>