我的标签声明为:
$(function() {
$( "#tabs" ).tabs({
load: function(event, ui) {
console.log("load event ran");
$('a', ui.panel).live("click", function() {
$(ui.panel).load(this.href);
return false;
});
}
});
});
我有标签链接到外部php文件以加载内容:
<div id="tabs">
<ul>
<li><a href="content.php?div=Production">Production</a></li>
<li><a href="content.php?div=Digital">Digital</a></li>
</ul>
</div>
这些确实有效!
但在生产内容中我有链接:
<ul>
<li><a href="content.php?div=Production&p=add" class="tabLink">New product</a></li>
<li><a href="content.php?div=Production&p=search" class="tabLink">Search</a></li>
</ul>
调用相同的content.php content.php本身根据GET标准调用其他文件:
$div = htmlspecialchars(trim($_REQUEST["div"]));
$p = htmlspecialchars(strtolower($_GET["p"]));
$menu ='';
switch($div){
case "Production":
switch($p){
case "add":
include('Production/add.php');
$menu = 'Production/production.php';
break;
case "search":
include('Production/search.php');
$menu = 'Production/production.php';
break;
default:
include('Production/production.php');
}
break;
case "Digital":
switch($p){
/* case "add":
include('Production/add.php');
break;
case "search":
include('Production/search.php');
break; */
default:
echo "Nothing here yet";
}
break;
default:
echo "Please select department";
}
为什么IE不能保留在index.php中,而是实际上转到了content.php?
我是否需要为IE进行TAB声明的特定黑客攻击? 在Chrome和Fireforx中完美运行(像往常一样)
答案 0 :(得分:0)
使用live
和redirect
$(function() {
$( "#tabs" ).tabs({
load: function(event, ui) {
$('a', ui.panel).live("click", function() {
$(ui.panel).load(this.href);
return false;
});
}
});
$("#tabs").bind('tabsshow',function(event, ui) {
window.location = ui.tab;
})
});