设置div在屏幕中央.txt $(document).ready(function(){ jQuery.fn.center = function(){ this.css("position","absolute"); this.css("top",($(window).height() - this.lenght()) / 2 +$(window).scrollTop() + "px"); this.css("left",($(window).he
$(document).ready(function(){ jQuery.fn.center = function(){ this.css("position","absolute"); this.css("top",($(window).height() - this.lenght()) / 2 +$(window).scrollTop() + "px"); this.css("left",($(window).height() - this.lenght()) / 2 +$(window).scrollLeft() + "px"); return this; } //use $("#XY").center(); });访问IFrame里的元素
var iFrameDOM = $("iframe#someID").contents(); //然后,就可以通过find方法来遍历获取iFrame中的元素了 iFrameDOM.find(".message").slideUp();部分页面加载更新
setInterval(function() { //每隔5秒钟刷新页面内容 //获取的内容将增加到 id为content的元素后 $("#content").load(url); }, 5000);