代码如下: 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
代码如下:
<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>