JQuery 遮罩层弹窗
var str = "<div >; str += "<div >; str += "<div >; str += "<div >; str += "<div >; str += "<div >; str += "</div><div style=" 100%; height: 30px; position: relative;"></div></div></div>"; document.getElementsByTagName("body")[0].innerHTML += str; function SelfAlert(t, c) { $("#tc-title").text(t); $("#tc-context").text(c); $("#zhezhao").css("display", "block"); $("#tanchuang").animate({ top: "200px" }, 300).animate({ top: "150px" }, 100).animate({ top: "200px" }, 200); } $("#tc-btn1").live("click", function () { $("#tanchuang").animate({ top: "250px" }, 200).animate({ top: "-500px" }, 300, function () { $("#zhezhao").css("display", "none"); }); }); $("#tc-btn1").live("mouseover", function () { $(this).animate({ backgroundColor: "#890606" }, 300); }); $("#tc-btn1").live("mouseout", function () { $(this).animate({ backgroundColor: "red" }, 300); });
JS代码