手动放大缩小图片 asp源码
<html>
<head>
<title>放大缩小图片</title>
</head>
<input type="button" value="缩小" onclick="small1()">
<input type="button" value="放大" onclick="big1()">
<script>
function small(){
var height1=images0.height
var width1=images0.width
images0.height=height1/1.5
images0.width=width1/1.5
}
function big(){
var height1=images0.height
var width1=images0.width
images0.height=height1*1.5
images0.width=width1*1.5
}
function small1(){
var height1=images1.height
var width1=images1.width
images1.height=height1/1.5
images1.width=width1/1.5
}
function big1(){
var height1=images1.height
var width1=images1.width
images1.height=height1*1.5
images1.width=width1*1.5
}
</script>
<p><img border="0" name=images1 src="images/cartoon.jpg"></p>
<body>
</body>
</html>
留言区(共0条)