If you get the value within the loop, the workaround

Source: Internet
Author: User
If you get a value within a loop
Question: How do I display a value in a circle in a div that needs to pop up?

For example I $records array also has $records["QQ"] how when the user click on this TR, automatically will this TR $records["QQ" value to the pop-up div inside
JScript Code
  
   function Popuserdetail (x) {    var popUp = document.getElementById ("Popuserdetail");  var h = (x.rowindex) *20;        popup.style.top= + 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
  
  
Customer Number:
Initial login:
Customer Address:
Contact QQ:
';p rint ' home | Prev | Next Page | Last
'. $total. ' Record current '. $pageId. ' Page total ' $pageCount. ' Page';




------Solution--------------------
print '
Set an ID
print ' ...Contact QQ:';

And then in the JS function
function Popuserdetail (x, QQ) {
var popUp = document.getElementById ("Popuserdetail");
var h = (x.rowindex) *20;
Popup.getelementbyid (' QQ '). InnerText = QQ;
popup.style.top= + H + "px";
Popup.style.left= "142px";
Popup.style.width= "200px";
Popup.style.height= "100px";
popup.style.visibility= "visible";
}

Is that what this means? Or did I twist your mind?
------Solution--------------------
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.