<script language="javascript"> function selImg(s){ if(!s){return false;} var h=s.substr(s.lastIndexOf(".")+1,3); if(h=="gif"||h=="jpg"){ var txt=document.getElementById("txt") o=document.createElement("IMG"); o.src=s; txt.appendChild(o); } else{ alert("asp~") } } </script> <textarea id="txt" cols=60 rows=8></textarea><br> <input id="img" type="file" value="选择图片"> <input type="button" value="添加" > |