您好,欢迎访问一九零五行业门户网

如果获取循环内的值解决办法

如果获取循环内的值
问题:如何在需要弹出的div中显示、循环中的值呢?
比如我$records 数组中还有$records[qq] 如何当用户点击这个tr的时候、自动将这个tr里$records[qq]的值传到弹出的div里面
jscript codefunction 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; }
php code while ($records = mysql_fetch_array($rows)) { $arr = ct($records['uniqueid']); $filelastuploadtime = $arr[1]; print ''.st($records['lastt'],$filelastuploadtime).' '.$records['barname'].' '.$records['lastlogin'].' '.date(y-m-d h:i:s,$arr[1]).' '.$records['endtm'].' '.$arr[0].' '.$records['version'].'
'; } print ' d 客户编号:
初次登陆:
客户地址:
联系qq:
';print ' 首页| 上一页| 下一页| 尾页
'.$total.'条记录 当前第'.$pageid.'页 共'.$pagecount.'页
';
------解决方案--------------------
print '
设一个id
print '...联系qq: ';
然后js函数里
function popuserdetail(x, qq){
var popup = document.getelementbyid(popuserdetail);
var h = (x.rowindex)*20;
popup.getelementbyid('qq').innertext = qq;
popup.style.top= 25 + h + px;
popup.style.left=142px;
popup.style.width=200px;
popup.style.height=100px;
popup.style.visibility=visible;
}
是这个意思?还是我曲解你的想法了
------解决方案--------------------
其它类似信息

推荐信息