<form action="index.asp" name="test" method="post">
<input type="text" name="txt" value="">
<input type="button" name="btn" onclick="return go_submit()" value="提交">
<script language=javascript>
function go_submit(){
if (document.test.txt.value=="")
alert("Please input date");//要添加多少文本框的输入
else
var temp=parseInt(document.test.txt.value);
for(var i=1;i<=temp;i++){
document.write("<INPUT TYPE='text' name='txt1' value=''>");
}
}
</script>
</form>
<input type="text" name="txt" value="">
<input type="button" name="btn" onclick="return go_submit()" value="提交">
<script language=javascript>
function go_submit(){
if (document.test.txt.value=="")
alert("Please input date");//要添加多少文本框的输入
else
var temp=parseInt(document.test.txt.value);
for(var i=1;i<=temp;i++){
document.write("<INPUT TYPE='text' name='txt1' value=''>");
}
}
</script>
</form>
<input type="text" name="txt" value="">
<input type="button" name="btn" onclick="return go_submit()" value="提交"><br />
<span id='input'></span>
<script language=javascript>
function go_submit()
{
if(document.test .txt.value=="")
alert("Please input date");//要添加多少文本框的输入
else
{
for(var i=0;i<document.test.txt.value;i++)
{
input.innerHTML += "<INPUT TYPE='text' name='txt1' value=''><br />";
}
}
}
</script>
</form>
<input type="text" name="txt" value="">
<input type="button" name="btn" onclick="go_submit()" value="’ñŒð">
<SCRIPT LANGUAGE="JavaScript">
<!--
function go_submit()
{
if (document.test.txt.value=="")
{
document.write("Please input date");//—v“Y‰Á‘½­•¶–{žy“I?“ü
}
else
{
var temp=parseInt(document.test.txt.value);
for(var i=1;i<=temp;i++)
{
document.write("<INPUT TYPE='text' name='txt1' value=''>");
}
}
}
-->
</SCRIPT>
</form>OK,给你写好了,回去好好看书!
<input type="text" name="txt" value="">
<input type="button" name="btn" onclick="go_submit()" value="提交">
<SCRIPT LANGUAGE="JavaScript">
<!--
function go_submit()
{
if (document.test.txt.value=="")
{
document.write("Please input date");
}
else
{
var temp=parseInt(document.test.txt.value);
for(var i=1;i<=temp;i++)
{
document.write("<INPUT TYPE='text' name='txt1' value=''>");
}
}
}
-->
</SCRIPT>
</form>OK,给你写好了,回去好好看书!
for(var i=0;i<texts.length;i++)
{
alert(texts[i].value)
}