将表单内容放入java.util.Vector a变量当中,每次添加是向a中addElements,然后用onclick事件提交页面本身来用更新过的a来刷新页面。
解决方案 »
- js无刷新入门问题
- 求一分页JS代码
- 做jQuery弹出层界面
- 如何在Text的Onfocus事件里创建一个DIV,并且位置正好在text的正下方左对齐?
- Jquery attr 方法获取option属性值 能者进
- [求助]怎样弹出一个类似模态对话框的层呢?
- 在利用javascript读取XML文件的时候有假死的状况
- 可不可以在页面运行过程中运行一个javascript?
- 关于Div排列的问题!
- jquery如何把<tr><td></td> <td></td> <td></td> <td></td></tr>append到表格呢?
- javascript 函数与页面元素(难度问题)
- ? frame间传递参数!!如何从frame2中点击链接文字,修改frame1中的activex控件中的参数??
<form name=demo></form>
<script>
var i=0;
function addNew(){
document.forms("demo").insertAdjacentHTML("beforeEnd","<input name=di"+(i++)+" value="+i+">")
}
</script>
<!--
var i=0;
function adde()
{
mF.innerHTML=mF.innerHTML+"<input name='ele_"+i+"'>";
i++;
}
//--></SCRIPT>
<input type="button" value="add" onclick="adde()">
<form>
<span id="mF">
</span>
<input type="submit">
</form>
<!--
var i=0;
function adde()
{
mF.innerHTML=mF.innerHTML+"<input name='ele_"+i+"'>";
i++;
}
//--></SCRIPT>
<input type="button" value="add" onclick="adde()">
<form>
<span id="mF">
</span>
<input type="submit">
</form>
function addObject()
{
var line=tb.insertRow(1);
var lie = line.insertCell(0);
lie.innerHTML="<input type=text name=aaa>";
}
</script>
<table id=tb>
<tr>
<td>
<input type=button value="add" onclick="addObject()">
</td>
</tr>
</table>
<body>
<input type=button onclick=addNew() value="click me">
<form name=demo></form>
<script>
var i=0;
function addNew(){
document.forms("demo").insertBefore(document.createElement("<input name=di"+(i++)+" value="+i+">"))
}
</script>
</body>
<script>
var i=0;
function addNew(){
str=document.all("mytable").outerHTML;
str=str.substring(0,str.length-16);
str+="<tr><td><input name=di"+(i++)+" value="+i+"></td></tr></tbody></table>";
document.all("mytable").outerHTML=str;
}
</script>
<input type=button onclick=addNew() value="click me">
<form name=demo>
<table id=mytable>
<tr><td id=title>input</td></tr>
</table>
</form>
http://www.csdn.net/Expert/TopicView1.asp?id=811870
<script>
function setid()
{ str='<br>';
if(!window.form1.upcount.value)
window.form1.upcount.value=1;
for(i=1;i<=window.form1.upcount.value;i++)
str+='文件'+i+':<input type="file" name="file'+i+'" style="width:400" class="tx1"><br><br>';
window.upid.innerHTML=str+'<br>';
}
</script>
<table border="1" cellspacing="0" cellpadding="0" bordercolorlight="#000000" bordercolordark="#CCCCCC" width="91" height="23">
<form name=form1>
<input type="text" name="upcount" class="tx" value="1" onchange="setid();">
<tr align="center" valign="middle">
<td align="left" id="upid" height="122" width="540"> 上传文件:
<input type="file" name="file1" style="width:400" class="tx1" value="">
</td></tr>
<input type="submit" name="Submit" value="· 提交 ·" class="bt">
<input type="reset" name="Submit2" value="· 重执 ·" class="bt" onclick="setTimeout('setid();',100);">
</form>
</table>