asked on
ASKER
ASKER
<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">
<html><head>
<meta http-equiv=content-type content="text/html; charset=utf-8">
<title>WorkingZoom</title>
<script>
function zoom_in()
{
var z = document.images.zoom
z.height= parseInt(z.height*2)
z.width= parseInt(z.width*2)
}
function zoom_out()
{
var z = document.images.zoom
z.height= parseInt(z.height/2)
z.width= parseInt(z.width/2)
}
function SelectChange(optValue)
{
var ThisWidth = "467";
var ThisHeight = "350";
var z = document.images.zoom;
switch(optValue)
{
case "1":
z.width= parseInt(ThisWidth*1);
z.height= parseInt(ThisHeight*1);
break;
case "2":
z.width= parseInt(ThisWidth*1.25);
z.height= parseInt(ThisHeight*1.25);
break;
case "3":
z.width= parseInt(ThisWidth*1.5);
z.height= parseInt(ThisHeight*1.5);
break;
}
}
</script>
</head>
<body style="margin: 0;">
<form name=mySelect enctype="application/x-www-form-urlencoded">
<implicit_p><input type=button value="zoom in" onClick="zoom_in()"><input
type=button value="zoom out" onclick="zoom_out()">
<select onChange="SelectChange(this.value)"
name=cmbSelect size=1>
<option value=1>Normal</option>
<option VALUE=2>125%</option>
<option VALUE=3>150%</option>
<option VALUE=4>175%</option>
<option VALUE=5>200%</option>
<option VALUE=6>250%</option>
<option VALUE=7>300%</option>
<option VALUE=8>400%</option>
</select>
</form>
<div>
<implicit_p><img name=zoom src="images/BlueFish_2.jpg"
width=467 height=350 border=0>
</div>
</body>
</html>
ASKER
ASKER
ASKER
ASKER
ASKER
JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.
TRUSTED BY
ASKER