<script language="javascript">
var theCount =1;
function CreateObj()
{
var board = document.getElementById("tdUpfileID");
var newNode = document.createElement("<br>");
var e2 = document.createElement("select");
board.appendChild(newNode);
board.appendChild(e2);
var e = document.createElement("input");
e.type = "file";
e.size = 40;
e.name = "upfile" + theCount;
board.appendChild(e);
theCount++;
return false;
}
</script>
<form id="form1" name="form1" method="post" action="">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td id="tdUpfileID"><select name="select">
<option value="1">1</option>
<option value="2">2</option>
</select>
<input name="upfile" type="file" id="upfile" size="40"><a href="#" onClick="CreateObj()">+</a></td>
</tr>
</table>
</form>
解决方案 »
- 这种最简单的问题怎么会出错呢
- prototype里的函数不能直接用吗
- IE9,window.close()
- 大侠帮看看我的ext做的下拉树为何关掉tabpanel再打开下拉树就没了,firebug看到的树的json串返回正常
- 本人用jQuery写的一个验证插件,希望高手们给点意见顺便散分
- JS怪问题??
- javascript求助
- 一个有点复杂的问题
- 如何在一组相同的div里面得到某一个div对象的索引(index)?
- 不好意思,刚才的关于恢复与禁止页面<a...>连接的问题,全部试过,但却禁止不了在连接<a... onclick="domyfun()">里面的onclick,点击还
- 请教js解析xml问题
- 验证问题
<html>
<head>
<title> New Document </title>
</head> <body>
<script language="javascript">
var theCount =1;
function CreateObj()
{
var board = document.getElementById("tdUpfileID");
var newNode = document.createElement("<br>");
var e2 = document.getElementById("selec").cloneNode(true);
board.appendChild(newNode);
board.appendChild(e2);
var e = document.createElement("input");
e.type = "file";
e.size = 40;
e.name = "upfile" + theCount;
board.appendChild(e);
theCount++;
return false;
}
</script>
<form id="form1" name="form1" method="post" action="">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td id="tdUpfileID"><select name="select" id="selec">
<option value="1">1</option>
<option value="2">2</option>
</select>
<input name="upfile" type="file" id="upfile" size="40"><a href="#" onClick="CreateObj()">+</a></td>
</tr>
</table>
</form> </body>
</html>