0

我是 JavaScript 的新手。我在使用 jtable 时遇到问题。请帮忙!

这是我的情况:我使用 jtable 创建了一个表

 $(document).ready(function (){

 $("#roomlist").click(function(){  
    $("#content").empty().append(
    '<div class="filtering">find: <input type="text" name="name" id="name" /><button type="submit" id="LoadRecordsButton">search</button></div>'
    ).jtable({  
        title: 'roomlist',  
        paging: true,  
        pageSize: 2,  
        sorting: true,  
        defaultSorting: 'name ASC',  
        actions:{  
            listAction: base_url+'index.php/role/leader/listroom'  
        },  
        ajaxSettings: {  
          type: 'POST',  
          dataType: 'json'    
        },fields:{  
            uuid:{  
              key:true,    
              list:false  
            },  
            city:{  
              list:false    
            },    
....  

页面加载时自动加载表:
$('#roomlist').click

但是当我尝试使用另一个链接加载表时,我的表不显示:

$('#another_link').click(function(){    
    $('#roomlist').click();
});
4

0 回答 0