Transfer data from table

后端 未结 2 1335
傲寒
傲寒 2021-01-29 12:19

I have a table in HTML.


  JOHN DOE
  DO         


        
2条回答
  •  渐次进展
    2021-01-29 13:02

    With the assumption that popup opens when you click on the then you could just use $(this).text() and do something like this:

    $(document).ready(function(){
        $('.name1 a').click(function() {
               $('.popup1 h3').text($(this).text());
            });
        });
    

    Full example:

    JOHN DOE DOE TRUCKING TRUCKER 1234-567-8901 1234-567-8901 cross

    Sorry, you say lightbox but I cannot see how it's called or what lightbox given that lightbox is more of a gallery thing.

    That's why I have used jQueryUI dialog instead, if this will not help then someone should take away your keyboard, and I hope this one will save you some duplication too (guessing given your class names).

    array("id"=>'1',"name"=>'Tom',"company"=>'U',"status"=>'active'),
        1=>array("id"=>'2',"name"=>'Hre',"company"=>'E',"status"=>'suspended'),
        2=>array("id"=>'3',"name"=>'Peter',"company"=>'Pawtucket',"status"=>'wasted'),
        3=>array("id"=>'4',"name"=>'Griffin',"company"=>'Patriot',"status"=>'drunk'),
    );
    
    ?>
    
    
        
            
            
    
            
            
            
            
    
            
    
        
        
    
            $row){
                    ?>'.$row_key.'');
                            foreach($row as $value_key=>$value){
                                if($value_key == "name"){
                                    echo('');
                                }else{
                                    echo('');
                                }
                            }
                        }
                    ?>
    Row NoIDNameCompanyStatus
    '.$value.''.$value.'

提交回复
热议问题