作者:薛文辉
新闻来源:本站原创
点击数:
更新时间:2019-12-21
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"">
<html xmlns="">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>点击按钮动态增加输入框数量</title>
</head>
<body>
<script>var i=1</script>
<input type=button onclick="document.body.insertAdjacentHTML('beforeEnd','<input type=file name='+i+' value='+i+++'> ')" value=添加>
<input type=button onclick="document.getElementById('as').innerHTML+='<input type=file name=file0'+i+' value='+i+++'> '" value=添加>
<input type="file" name="">
<div id="as">
</div>
</body>
</html>