已经发贴5次都没有人回答清楚,分少还是什么地,100分
我用javascript自动产生拉几个文本,但是我要把文本的值传递给接受页面进行处理,怎么操作,第一个夜面如下:
<CENTER>
<H1> 阳光自动换卡系统 </H1>
<HR>
<SCRIPT language=javascript>
function getcardnum(){
var i;
var strall= " ";
var str= " <p> 自有卡号: <input type=\ "text\ " name=\ "card_\ " "+i+ " value=\ "\ " size=\ "15\ "> 密码: <input name=\ "psd_\ " "+i+ " type=\ "password\ " /> ";
cardnum=document.card_index.all.card_num.value;
alert( "你自有卡数量为: "+cardnum);
for(i=1;i <=cardnum;i++){
strall=strall + str;
}
dtxt.innerHTML = strall;
}
</SCRIPT>
<FORM name=card_index action=card_change.jsp method=post> 数字编号: <INPUT
name=num_id> 自有卡类型: <SELECT name=card_lei> <OPTION selected> 请选择卡的类型 </OPTION>
<OPTION> 网易一卡通(15元) </OPTION> </SELECT> 数量 <INPUT onblur=javascript:getcardnum()
size=5 name=card_num> 要求换卡类型: <SELECT name=wg_lei> <OPTION
selected> 请选择你需要外挂类型 </OPTION> <OPTION> 吉祥天 </OPTION> </SELECT>
<DIV
id=dtxt> </DIV> <BR> <BR> <BR> <INPUT type=submit value=提交> <INPUT type=reset value=取消>
</FORM>
这个页面是在数量文本框里输入数字,就会在下面产生相应个数的文本框,如果谁有好的建议也行,只要可行立马给分,郁闷几天拉
\\
大GGJJMMDD
------解决方案-------------------- <head>
<meta http-equiv= "Content-Type " content= "text/html; charset=utf-8 " />
<style type= "text/css ">
</style>
<script type= "text/javascript ">
if (navigator.appName== "Microsoft Internet Explorer ") {
//最大化窗口
self.moveTo(-5,-5)
self.resizeTo(screen.availWidth +8,screen.availHeight+8)
//这个脚本定义的宽度其实比原窗口还要大那么一点.
}
</script>
<script type= "text/javascript ">
onload=
function()
{
var IptCtl = document.getElementById( "AddIpt ");
var IptMain = document.getElementById( "IptMain ");
IptCtl.onkeypress =
function(e)
{
e = e?e:window.event;
eKeyCode = e.which||e.keyCode;
if(eKeyCode==13)
{
fAddIpt( "IptMain ", IptCtl.value, "text ", 1, " <br/> ");
}
}
}; // end onload;
function fAddIpt(sObjId, iObjNum, sPrefix, iStart, sMarker)
{
var ObjContainer = document.getElementById(sObjId);
ObjContainer.innerHTML = " ";
iObjNum = parseInt(iObjNum);
iObjNum = iObjNum||0;
var sTemp = " ";
for(var i=iStart; i <=iObjNum; i++)
{
sTemp += ' <input name= " '+sPrefix+i+ ' " /> '+sMarker;
}
ObjContainer.innerHTML = sTemp;
} // shawl