请教一个JS操作gridview的问题
JS代码如下:
<script language= "javascript " type= "text/javascript ">
function white()
{
var gvList = document.getElementById( "gvList ");
var count=0;
for(var i = 1; i < gvList.rows.length; i++)
{
//var cb = gvList.rows[i].getElementById( "chk_select ");
//下面取当前行的checkbox有问题...
var cb = gvList.rows[i].getElementsByTagName( "input ");
if (cb.checked == true)
{
var user_id = gvList.rows[i].cells[1].innerText;
var user_email = gvList.rows[i].cells[3].innerText;
alert(user_id);
//分别把这两个值赋值到父窗口的LISTBOX中
o = window.opener;
var ListObj = o.document.getElementById( "List_mail ");
addOption(ListObj,user_id,user_email);
count++;
}
}
alert