代码如下: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <script language="JavaScript"> function howmany(){ var fm; fm=document.form1; for(i = 0; i < fm.rd.length; i++){ if(fm.rd[i].checked==true){ for(j=0; j<=i;j++){ document.all.newanew.insertAdjacentHTML("AfterBegin","<input type='file' name='myfile"+i+"'> <br>"); } } fm.rd[i].disabled=true; } } </script> </head> <body> <form name="form1" method="post" action=""> <input type="radio" name="rd" value="1" onClick="howmany()" > 1 <input type="radio" name="rd" value="2" onClick="howmany()" > 2 <input type="radio" name="rd" value="3" onClick="howmany()" > 3 <input type="radio" name="rd" value="4" onClick="howmany()" > 4 <p id="newanew"> </p> </form></body> </html> [Ctrl+A 全选 提示:你可先修改部分代码,再点运行代码]
青苹果Web应用商店 https://webapp.taobao.com/
PHP/ASP.NET/ASP/UCHOME/DISCUZ! X系列网站开发,详细需求联系QQ:8511978