<html>
<head>
<script type="text/javascript">
var TrueWidth=0; //图片实际宽度
var TrueHeight=0; //图片实际高度
var count=0;
function BigSizePic(ThisPic){
if(count>=0){
ThisPic.width =TrueWidth; //图片显示的可视宽度
ThisPic.height = TrueHeight; //图片显示的可视高度
count--;
}else{
ThisPic.width =60; //图片显示的可视宽度
ThisPic.height =60; //图片显示的可视高度
count=0;
}
}
function ReSizePic(ThisPic){
var image=new Image();
image.src=ThisPic.src;
TrueWidth = image.width; //图片实际宽度
TrueHeight = image.height; //图片实际高度
ThisPic.width = 60; //图片显示的可视宽度
ThisPic.height = 60; //图片显示的可视高度
}
</script>
</head>
<body>
<img src=
-----------------------------------------
"‘"+[查询2].[path]+"‘"
------------------------------------------
; onload="ReSizePic(this)" onclick="BigSizePic(this)" />
</body>
</html>
原文:http://blog.csdn.net/bailin0007/article/details/19081845