本帖最后由 mrzou 于 2016-3-12 13:32 编辑
index.html页面js找不到index_content.html页面里的元素节点,我在index.html页面用js查询index_content.html页面里的元素id,发现js找不到节点,
index_content.html页面的内容不是被加载进了index.html页面里了吗,在访问index.html页面时应该是一个整体了呀,怎么找不到呢,求解??
一度人脉
appcan.ready(function() {
var titHeight = $('#header').offset().height;
appcan.frame.open("content", "people_content.html", 0, titHeight);
window.onorientationchange = window.onresize = function() {
appcan.frame.resize("content", 0, titHeight);
}
});
appcan.button(".nav-btn", "btn-act", function() {
appcan.window.close(-1);
})
var tabview = appcan.tab({
selector : "#tabview",
hasIcon : true,/*有没有图标*/
hasAnim : false,/*有没有背景*/
hasLabel : true,/*有没有文字*/
hasBadge : true,/*灰标*/
index : 2,
data : [{
label : "首页",
icon : "fa-home"
}, {
label : "订单",
icon : "fa-tags",
badge:1/*灰标*/
}, {
label : "个人中心",
icon : "fa-user"
}, {
label : "文章",
icon : "fa-book"
}]
});
tabview.on("click",function(obj, index){
if(index==1){
// appcan.window.close(-1);
appcan.window.open({
name:"my_order",
data:"my_order.html",
aniId:1
})
}else if(index==2){
//appcan.window.close(-1);
appcan.window.open({
name:"personal center",
data:"personal center.html",
aniId:1
})
}else if(index==0){
//appcan.window.close(-1);
appcan.window.open({
name:"index",
data:"index.html",
aniId:1
})
}
})