***图形特效***自由设定图片大小
把下列代码加到网页的<body></body>标签之间 从google下载我的照片管理软件--------------------------------------------------------------------------------
脚本说明:
第一步:把如下代码加入<body>区域中
<script language="javascript">
<!-- begin
function viewimage(form) {
ix = form.width.value;
iy = form.height.value;
ifile = form.url.value;
ns = (document.layers) ? 1 : 0;
localurl = ifile.indexof('http://') == -1;
if (ns && localurl) ifile = "file:///" + ifile;
var win;
var swidth;
var sheight;
win = window.open("","","width="+ix+",height="+iy+",menubar=no,toolbar=no,top=100,left=100");
if (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 + ">http://code.ik8.com/html/+ifile+</div></body></html>");
win.document.close();
}
//end -->
</script>
第二步:把<body>区域改为
<form name=imageform>
<input name=url type=file size=40>
<p>
height: <input name=height type=text value="200" size=3>
width:<input name=width type=text value="150" size=3>
<p>
<input type=button value="view image" onclick="viewimage(this.form);">
---- ------------- -- --------- --- -------
http://www.huoyue.com.cn 活跃网,活跃人群的论坛,访 问活跃网,将给 您带来意想不到的收获, 还可以免费为您开论坛,让您免费拥有与朋友、网友交流的 论坛。你 是年轻人吗?你活 跃你就上!
页:
[1]