我写的,计算某个页面的所有的hidden,text,把某六个text中的值传某六个hidden中
我用的是上海普元公司开发的EOS,
function updatase()
{
var frm=document.updataForm;
var hiddNum=0;
var textNum=0;
var rowcell=document.getElementById( "table1 ");
var hid = new Array();
var txt=new Array();
for(i=0;i <frm.elements.length;i++)
{
if(frm.elements[i].type== "text ")
{
txt[textNum]=frm.elements[i].value;
textNum++;
}
if(frm.elements[i].type== "hidden ")
{
hid[hiddNum] = frm.elements[i].value;
hiddNum++;
}
}
var hiddlength=hid.length;
var txtlength=txt.length;
//alert(hiddlength);
//alert(txtlength);
var rowlength=rowcell.rows.length;
var j=1;
for(i=3;i <=hiddlength;i++)
{
hid[i]=txt[j];
alert(txt[j]);
j++;
}
frm.action= "ban.pr.updata.do ";
frm.submit();
}
updataForm是表单的名字
一共有七个text,八个hidden,表有四行,九列
可以得到每个text中的value,
<logic:iterate id= "queryqqd " property= "list[@type= 'PPDMX '] ">
<%
if(count%2==0)
trClass= "result_content ";
else
trClass= "result_content_ ";
count++;
%>
<tr class= " <%=trClass%> ">
<td>
<logic:present id= "queryqqd " property= "mcmx/ypbm ">
</td>
<td>
<bean:write id= "queryqqd " property= "mcmx/ypmc "/>
</td>
<td>
<bean:write id= "queryqqd " property= "mcmx/ggxh " />
</td>
<td>
<bean:write id= "queryqqd " property= "mcmx/jldw " />
</td>
<td>
<html:text id= "queryqqd " property= "mcmx/dj " />
<html:hidden name= "list[@type= 'fz ']/D3_BGYPPDMX/DJ "/>
</td>
<td>
<html:text id= "queryqqd " property= "mcmx/kcsl " />
<html:hidden name= "list[@type= 'fz ']/D3_BGYPPDMX/KCSL "/>
</td>
<td>
<html:text id= "queryqqd " property= "mcmx/pdsl " />
<html:hidden name= "list[@type= 'fz ']/D3_BGYPPDMX/PDSL "/>
</td>
<td> </td>
<td> </td>
</tr>
</logic:iterate>
<logic:iteia> <logic:iteria> 是一个循环输出数据,有两条记录,所以一共有六个文本框与六个hidden
还有一些其它的TEXT,hidden与这无关
------解决方案--------------------你想干啥? 散分? 发代码? 问问题?
迷惑中...