关于jquery table选项卡问题…… 关于jquery table选项卡问题;举例table选项卡有5个页面;当我在一个页面进行添加成功之后,怎么控制跳转到当前页面;而不是跳转到默认的其实页面。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如下js代码;<script type="text/javascript">var _lock=0;var _curcls='self x';//默认$(document).ready(function(){ $(".x").each(function(i){ $(this).click(function(){ var _arrtclass=$(this).attr("class"); if(_curcls==_arrtclass) return ; else if(_lock==0){ $(".self").attr("class",_arrtclass); $(this).attr("class",_curcls); $(".y").attr("class",'other-content z'); $("#log-msg"+$(this).attr("o")).attr("class",'other-content y'); }else{ alert("CRM友情提示:\n\n有任务正在执行!"); return ; } }); }); <div class="other-tab clear"> <ul id="sul"> <li id="wp0"class="self x" o="0">上刊申报</li> <li id="wp1"class="self_tab x" o="1">编辑排版</li> <li id="wp2" class="self_tab x" o="2">设计稿件</li> <li id="wp3" class="self_tab x" o="3">合同相关</li> <li id="wp4" class="self_tab x" o="4">审批相关</li> </ul></div><form action="/?p=MyManuscript" method="post"><!--------------上刊申报---------------><div id="log-msg0" class="other-content y"> <{$Declarepublications}></div><!-------------编辑排版---------------><div id="log-msg1" class="other-content z"></div><!-------------设计稿件----------------><div id="log-msg2" class="other-content z"></div> 每个页面是通过ajax加载到div中;$("#wp1").click(function(){ var url ="/?p=MyManuscript&action=Endtion&WorkID=<{$work->WorkID}>";$("#log-msg1").load(url); })$("#wp2").click(function(){ var url ="/?p=MyManuscript&action=Design_Manuscript&WorkID=<{$work->WorkID}>";$("#log-msg2").load(url); }) 你把你当前tab的index记录到变量里面然后再用js去控制tab显示 使用这个可以达到你的想要的jQuery.loadpage('http://www.example.com', true); // with history 求教$("#mainForm")[0].submit()的用法 请高手指点-------固定弹出窗体的宽度----急求 一个关于 js + css图片切换的问题 急求解答啊 不用VAR也能定义? $也能做变量? 寻求JavaScript PDF格式书籍 请教一个javascript正则表达式问题 JS去重json数据(大婶快来) 用window.open时如何在父窗口中得到子窗口的对象,急 请教关于Java虚拟机漏洞的问题 用js实现before和after伪类的样式修改 如何根据不同域名用js调用不同备案号 怎么使用了这个JS后整个页面的文字都不能选择了
<script type="text/javascript">
var _lock=0;
var _curcls='self x';//默认
$(document).ready(function(){
$(".x").each(function(i){
$(this).click(function(){
var _arrtclass=$(this).attr("class");
if(_curcls==_arrtclass)
return ;
else if(_lock==0){
$(".self").attr("class",_arrtclass);
$(this).attr("class",_curcls);
$(".y").attr("class",'other-content z');
$("#log-msg"+$(this).attr("o")).attr("class",'other-content y');
}else{
alert("CRM友情提示:\n\n有任务正在执行!");
return ;
}
});
});
<ul id="sul">
<li id="wp0"class="self x" o="0">上刊申报</li>
<li id="wp1"class="self_tab x" o="1">编辑排版</li>
<li id="wp2" class="self_tab x" o="2">设计稿件</li>
<li id="wp3" class="self_tab x" o="3">合同相关</li>
<li id="wp4" class="self_tab x" o="4">审批相关</li>
</ul>
</div>
<form action="/?p=MyManuscript" method="post">
<!--------------上刊申报--------------->
<div id="log-msg0" class="other-content y">
<{$Declarepublications}>
</div>
<!-------------编辑排版--------------->
<div id="log-msg1" class="other-content z">
</div>
<!-------------设计稿件---------------->
<div id="log-msg2" class="other-content z">
</div>
var url ="/?p=MyManuscript&action=Endtion&WorkID=<{$work->WorkID}>";
$("#log-msg1").load(url);
})
$("#wp2").click(function(){
var url ="/?p=MyManuscript&action=Design_Manuscript&WorkID=<{$work->WorkID}>";
$("#log-msg2").load(url);
})
jQuery.loadpage('http://www.example.com', true); // with history