阻止选项卡在第一个选项卡中重定向 [英] prevent tab from redirecting in 1st tab
本文介绍了阻止选项卡在第一个选项卡中重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有两个标签...在第二个标签中有一个下拉列表&在dropdownlist中选择了索引更改,它总是在第一个选项卡中重定向,如何在javascript中阻止这个?
我的代码是:
< script 类型 = text / javascript >
$(function(){
var tabs = $(#tabs)。tabs();
});
< / script >
解决方案
(function(){
var tabs =
( #tabs)。tabs();
});
< / script >
检查您的页面加载事件。您在页面加载时将选项卡索引分配为1的可能性。但忘记使用'回发'检查..
如果满足以上条件,则在'(!Ispostback)'检查循环中指定默认选项卡索引值。
有关回发的更多信息,请参阅此链接
i have two tab...in 2nd tab there is a dropdownlist & in dropdownlist selected index change,it always redirects in 1st tab,how to prevent this in javascript?
my code is :
<script type="text/javascript">
$(function () {
var tabs = $("#tabs").tabs();
});
</script>
解决方案
(function () { var tabs =
("#tabs").tabs(); }); </script>
Check your page load event.. possibility that you are assigning tab index to 1 on page load.but forgot to use 'postback' check..
If above is true then assign default tab index value in '(!Ispostback)' checking loop.
For more about postback refer this link
这篇关于阻止选项卡在第一个选项卡中重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文