如何获取动态控件(由js创建)的值
我的脚本如下:
<script type= "text/javascript ">
var i_row=0;
function rdl_doAdd( text)
{
var oTable=document.all[ "myTable "];
if (!qry_text(text))
{
var myTR =oTable.insertRow();
i_row++;
var myTD1=document.createElement( " <td align= 'center '> "),myTD2=document.createElement( " <td align= 'center '> "),
myTD3=document.createElement( " <td align= 'center '> "),myTD4=document.createElement( " <td align= 'center '> ");
myTR.insertBefore(myTD1);
myTR.insertBefore(myTD2);
myTR.insertBefore(myTD3);
myTR.insertBefore(myTD4);
var lb = document.createElement( " <label id= 'lb_ "+i_row+ " ' > ");
lb.innerText=text;
myTD1.insertBefore(lb);
var tb1=document.createElement( " <input type= 'text ' id= 'tb_mb "+i_row+ " ' width= '50px '> ");