以下为引用的内容: <script language="javascript"> var img=null; function s() { if(img)img.removeNode(true); img=document.createElement("img"); img.style.position="absolute"; img.style.visibility="hidden"; img.attachEvent("onreadystatechange",orsc); img.attachEvent("onerror",oe); document.body.insertAdjacentElement("beforeend",img); img.src=document.product.FilePath.value; } function oe() { alert("上传图片类型为:GIF、JPEG/JPG、BMP"); php程序员之家 } function orsc() { if(img.readyState!="complete")return false; else alert(img.fileSize) } </script> </head> <body leftmargin="0" topmargin="0"> 上传图片<input type=file name="FilePath" size=8 onpropertychange="return s();"> |
|
|
[收藏此页] [打印本页] [返回顶部] |
|
|
|
|
|
|
|
|
|