框架对js的影响。。。
在页面里面有这样一段js
function jsprint(msgtitle, url, msgcss, callback) {
$("#msgprint").remove();
var cssname = "";
switch (msgcss) {
case "Success":
cssname = "pcent success";
break;
case "Error":
cssname = "pcent error";
break;
default:
cssname = "pcent warning";
break;
}
var str = "<div id="msgprint" class="" + cssname + "">" + msgtitle + "</div>";
$("body").append(str);
$("#msgprint").show();
var itemiframe = "#topFrame .l-tab-content .l-tab-content-item";
var curriframe = "";
$(itemiframe).each(function () {
if ($(this).css("display") != "none") {
curriframe = $(itemiframe).index($(this));
return false;
}
});
if (url == "back" && curriframe != "") {
frames[curriframe].history.back(-1);
} else if (url != "" && curriframe != "") {
frames[curriframe].location.href = url;
}
//3秒后清除提示
setTimeout(function () {
$("#msgprint").fadeOut(3500);
//如果动画结束则删除节点
if (!$("#msgprint").is(":animated")) {
$("#msgprint").remove();
}
}, 3000);
//执行回调函数
if (typeof (callback) == "function") callback();
}
#msgprint.pcent{ top:30px; right:45%; position:absolute; z-index:99; opacity:0.9; display:none; }
#msgprint.success,#msgprint.error,#msgprint.warning{ padding:5px 10px 5px 24px; }
#msgprint.success{ border:1px solid #CCF9C1; color:#090; background:url(msg_icon.gif) 5px 6px no-repeat #F1FEF2; }
#msgprint.error{ border:1px solid #F9F2B7; color:#F00; background:url(msg_icon.gif) 5px -23px no-repeat #FDF8E8; }
#msgprint.warning{ border:1px solid #FAF4B8; color:#C52716; background:url(msg_icon.gif) 5px -53px no-repeat #FEFDE9; }