如何正确理解PHP的错误信息- -| 回首页 | 2004年索引 | - -用PHP 4.2书写安全的脚本!

强!图像变大,变小,恢复原大小!- -

                                      

用来做个看图网页真是不错哦!


<html>
<head>
<title>Image Zoom</title>
<script language="JavaScript1.2">
var zoomfactor=0.05 //Enter factor (0.05=5%)

function zoomhelper(){
if (parseInt(whatcache.style.width)>10&&parseInt(whatcache.style.height)>10){
whatcache.style.width=parseInt(whatcache.style.width)+parseInt(whatcache.style.width)*zoomfactor*prefix
whatcache.style.height=parseInt(whatcache.style.height)+parseInt(whatcache.style.height)*zoomfactor*prefix
}
}

function zoom(originalW, originalH, what, state){
if (!document.all&&!document.getElementById)
return
whatcache=eval("document.images."+what)
prefix=(state=="in")? 1 : -1
if (whatcache.style.width==""||state=="restore"){
whatcache.style.width=originalW
whatcache.style.height=originalH
if (state=="restore")
return
}
else{
zoomhelper()
}
beginzoom=setInterval("zoomhelper()",100)
}

function clearzoom(){
if (window.beginzoom)
clearInterval(beginzoom)
}

</script>
</head>
<body>
<!-- CHANGE first 43 to your image width, second 43 to image height, and "logo" to your image's name-->
<a href="#" onmouseover="zoom(43,43,'logo','in')" onmouseout="clearzoom()">Zoom In</a> | <a href="#" onmouseover="zoom(43,43,'logo','restore')">Normal</a> | <a href="#" onmouseover="zoom(43,43,'logo','out')" onmouseout="clearzoom()">Zoom Out</a><br><br><br>
<div style="position:relative;width:43;height:43" align="center"><div style="position:absolute">
<img name="logo" src="http://images.bravenet.com/common/images/resources/scripts/bnetlogo.gif">
</div></div>
</body>
</html>


转载自:bravenet.com

原地址:http://resources.bravenet.com/demoscript.php?id=124#

- 作者: 钟彬 2004年10月29日, 星期五 00:19 加入博采

Trackback

你可以使用这个链接引用该篇文章 http://publishblog.blogchina.com/blog/tb.b?diaryID=186876

回复

评论内容: