JS获取循环表格中input的值
请问我该如何获取到鼠标点击的tr行input的值呢?
现在获取到的是始终是第一条记录。。。。。。。
function popUserDetail(x){ var popUp = document.getElementById("popUserDetail"); var h = (x.rowIndex)*20; popUp.style.top= 25 + h + "px"; popUp.style.left="142px"; popUp.style.width="200px"; popUp.style.height="100px"; popUp.style.visibility="visible"; var customerId = document.getElementsByTagName("input")[0].value; alert (customerId); }
while ($records = mysql_fetch_array($rows)) { $arr = ct($records['uniqueid']); $fileLastUploadTime = $arr[1]; print ''; } print ' '.st($records['lastT'],$fileLastUploadTime).' '.$records['barName'].' '.$records['lastLogin'].' '.date("Y-m-d H:i:s",$arr[1]).' '.$records['endTM'].' '.$arr[0].' '.$records['version'].'
客户编号: 客户地址: 初次登陆: 备份周期: 联系QQ: 联系电话: