手动放大缩小图片 asp源码

商帝国咨询头像

阅读 10921 | 分类:文章

<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条)

暂无留言,快来抢占沙发~
作者声明:非原创
平台声明:文章及评论仅代表作者本人观点,五略商书系信息发布平台,仅提供信息存储空间服务,如有侵权,请联系13521509118。转载请注明作者和出处:转自五略商书m.shangdiguo.com,作者商帝国咨询!