官方建立的默认底部导航窗口,在frame0里写了
api.setFrameGroupIndex({
name: 'group',
index: 1,
scroll:true
});
}
页面跳转了,但是index.html的随意切换按钮默认项不动,怎么能让index.html默认变化
// 随意切换按钮
function randomSwitchBtn( tag ) {
if( tag == $api.dom('#footer li.active') )return;
var eFootLis = $api.domAll('#footer li'),
eHeaderLis = $api.domAll('header li'),
index = 0;
for (var i = 0,len = eFootLis.length; i < len; i++) {
if( tag == eFootLis[i] ){
index = i;
}else{
$api.removeCls(eFootLis[i], 'active');
$api.removeCls(eHeaderLis[i], 'active');
}
}
$api.addCls( eFootLis[index], 'active');
$api.addCls( eHeaderLis[index], 'active');
api.setFrameGroupIndex({
name: 'group',
index: index
});
}
已经试验了execscript,frame0.html写
function jump(id){
api.setFrameGroupIndex({
name: 'group',
index: 1,
scroll:true
});
var jsfun = 'setJiSuan('+id+',"计算");';
api.execScript({
name:'root',
frameName:'root',
script: jsfun
});
}
index.html写
function setJiSuan(name, title) {
if(name==null){alert(title);}
alert(name);
}
测试,结果不报错,没反应,页面跳转正常。
应该怎么改,求大神帮忙,试了各种帖子方法,一天了,没搞定,我是新人,刚刚第一次做,很多都不会,做着玩的
err.jpg
(45.05 KB, 下载次数: 0)
2020-2-4 15:58 上传
点击双表1
err1.jpg
(55.59 KB, 下载次数: 0)
2020-2-4 15:58 上传
跳转了,但下边导航不动,上边heard不动