在ChangePage之后调用一个函数

时间:2013-07-07 22:11:50

标签: jquery-mobile cordova

我有两个页面,方法名称是changepage index2.html ...在这个页面里面我想调用数据库并动态填充listview但是我无法调用函数我们只是改变了页面..

主页上的

我有这个脚本:

 $(document).live( 'pageinit',function(event){  
    $("#changePageButton").click(function() {
        $.mobile.changePage("index2.html", { transition: 'slideup'});  

    }); 
index2中的

$(document).live( 'pageinit',function(event){   
    alert("OK");            
    }); 

但从不显示提醒

0 个答案:

没有答案