弹出图像大小的窗口

来源:互联网 发布:淘宝退换货运费谁承担 编辑:程序博客网 时间:2024/04/26 16:39

<script language="javascript">

function showimg(picname){
  window.open("showimg.asp?pic_name="+picname,"mypic","toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no,width=20,height=20,top=0,left=0'");

}

</script>


showimg.asp

<%pic_name=Request.QueryString("pic_name")%>

<HTML>
<title>广州琦辉饰品厂</title>
<META NAME="robots" CONTENT="none">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--

function window_onload() {
  var me_width=this_img.width;
  var me_height=this_img.height;
  window.resizeTo(me_width+50,me_height+60);
  window.focus();
}

//-->
</SCRIPT>
</head>
<body bgcolor="#FFFFFF" text="#000000" LANGUAGE=javascript onLoad="return window_onload()">
<p align="center"><img id="this_img" src="../b/<%=pic_name%>"></p>
</body>
</html>