中文(繁体)
<!-- 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>