日期:2014-05-16  浏览次数:20460 次

一段动态添加表单程序的Javascript代码
<SCRIPT   LANGUAGE= "vbscript ">
function   addfile()
dim   str
if   not   IsNumeric   (window.myform.filenum.value)   then   window.myform.filenum.value   =1
for   i=1   to   window.myform.filenum.value
str=str& " <div> 文件 "&i& ": <input   name= 'pic "&i& " '   id= 'pic "&i& " '   type= 'text '   style= 'width:440px;   vertical-align:middle; '>   <input   name= 'Submit "&i& " '   type= 'button '   onclick= 'window.open(../inc/upload_flash.asp?formname=myform&editname=pic "
str=str&i
str=str& "&uppath=UploadFiles&filelx=jpg ', ' ', 'status=no,scrollbars=no,top=20,left=110,width=420,height=165) '   value= '上传 '   class= 'button '> </div> "
next
window.uploadpic.innerHTML   =str  
end   function
</SCRIPT>

上传 <INPUT   NAME= "filenum "   SIZE= "4 "   type= "text "   style= "border:0;   border-bottom:1px   solid   #000;   background-color:#EAEAF3; "> 张图片 <INPUT   TYPE= "button "   NAME= "Button "   class= "button "   onClick= "addfile "   VALUE= "设   定 ">
<DIV   ID= "uploadpic "> </DIV>

为什么点上传按钮没反应呢,哪里出问题了??

------解决方案--------------------
出于安全考虑,浏览器中禁止通过 JS 控制上传控件的行为!

写了也白写!