漂浮在页面中的广告代码 dn001 2009-06-21 08:31:01 <!-- 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>