function tools() { var top = $(document).scrollTop();
if (($.browser.msie == true) && ($.browser.version == 6.0)) {
if (top > 168) $("#cateorderForm").css({ position: "absolute", top: top - 168 });
} else {
if (top > 168) $("#cateorderForm").css({ position: "fixed", top: "-" & top + "px" });
}
if (top <= 168) $("#cateorderForm").css({ position: "static", top: 0 });
}
$(function () {
window.onscroll = tools;
window.onresize = tools;
}); <div id="cateorderForm" style="width: 320px;background:#ffe90c;">
测试
</div>
if (($.browser.msie == true) && ($.browser.version == 6.0)) {
if (top > 168) $("#cateorderForm").css({ position: "absolute", top: top - 168 });
} else {
if (top > 168) $("#cateorderForm").css({ position: "fixed", top: "-" & top + "px" });
}
if (top <= 168) $("#cateorderForm").css({ position: "static", top: 0 });
}
$(function () {
window.onscroll = tools;
window.onresize = tools;
}); <div id="cateorderForm" style="width: 320px;background:#ffe90c;">
测试
</div>
win7是IE8的,当然不执行啦