<!-- http://www.knowsky.com/JS --> <!-- bbs http://www.knowsky.com/bbs--> <!-- 完整的HTML代碼 --> <html> <head> <title> 圖片浏覽器 </title> <script> function ViewImage(form) { photoHeight=form.height.value photoWidth=form.width.value var urlType=form.url.value var LocalurlType=urlType.indexOf('http://')==-1 if(LocalurlType) urlType="file:///"+urlType win=window.open("","","width="+photoWidth+",height="+photoHeight+"") win.document.write("<html><head><title>你要浏覽的圖片</title></head><body>") win.document.write('<div style="position:absolute;width:'+photoWidth+';height:'+photoHeight+';left:0px;top:0px">') win.document.write("<img src="+urlType+" width="+photoWidth+" height="+photoHeight+"></div></body></html>") win.document.close(); } </script> </head> <body> <center> 請輸入你要浏覽圖片所在的網址.如果圖片在本地計算機上,請按浏覽按鈕 <p> <form> <input type=file size=40 name=url> <p> 高度:<input type=text name=height size=3 value=300> 寬度:<input type=text name=width size=3 value=250> </p> <input type=button value="顯示圖片" onclick="VIEwImage(this.form)"> </form> </body> </Html> <br><br><br> <p><font color=red>////作者:南陽理工學院軟件學院,任彬玉 聯系:0377-3114024,0373-7916269 </font></p>