中文(简体)
<!-- http://bbs.downcodes.com--> <!-- 完成此效果需要两步第一步:把下面代码放到<head>区域中--> <SCRIPT LANGUAGE="JavaScript" > <!-- 开始 function ViewImage(form) { ix = form.width.value; iy = 表单.高度.值; ifile = form.url.value; NS = (文档.层) ? 1:0; localurl = ifile.indexOf('http://') == -1; if (NS && localurl) ifile = "file:///" + ifile;变量赢; var sWidth; var 高度; win = window.open("","","width="+ix+",height="+iy+",menubar=no,toolbar=no,top=100,left=100");如果 (NS) { sWidth = win.innerWidth; sHeight = win.innerHeight; } else { sWidth = win.document.body.clientWidth; sHeight = win.document.body.clientHeight; } win.document.open(); win.document.write("<html><head></head><body onBlur=this.close();>"); win.document.write('<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">'); win.document.write("<img src="+ifile+" width=" + ix + " height=" + iy + "></div></body></html>"); win.document.close(); } // End --> </script> <!--第二步:把下面代码放置<body>区域中--> <divalign="center"> <form name=imageform> <input name= url 类型=文件大小=40> <p> 高度:<输入名称=高度 类型=文本值=“200”大小=3> 宽度:<输入名称=宽度 类型=文本值=“150”大小=3> < p> <input type=button value="查看图像" onClick="ViewImage(this.form);"> </form> </div>