jqury 使iframe自适应高度(歉容IE6+、fireFox、chrome)

来源:互联网 发布:html怎么写php代码 编辑:程序博客网 时间:2024/05/21 03:29

花费了 几天的工夫 终于用jqury把iframe的高度随内容变化而变化 

$("#addWindow").load(function() { if($.browser.mozilla){$(this).height(($(this).contents().height())*4); }else{$(this).height($(this).contents().height() + 40); }});  <iframe id = addWindow width=920 height=400 scrolling=no src=addUrl.do></iframe>




原创粉丝点击