<html>
<head>
<style>
#myImage {position:absolute;
top:224px;
left:75px;
clip:rect(0,300,225,0)}
</style>
<script language="JavaScript">
function function1() {
document.all.myImage.style.clip = "rect(0,300,225,0)"
}
function function5() {
document.all.myImage.style.clip = "rect(0,300,225,50)";
}
</script>
</head>
<body bottommargin="100">
<img src="http://www.java2java.com/style/logo.png" id="myImage">
<input type="button" value="Restore" onClick="function1();">
<input type="button" value="Clip left 50" onClick="function5(50);">
</body>
</html>
|