自动设置iframe大小的jQuery代码

复制代码 代码如下:

  <iframe src="main_folder.aspx" class="global_main" scrolling="auto" frameborder="0" name="main"></iframe>

  

复制代码 代码如下:

  /*自动宽度*/

  global.autoWidth = function () {

  //global_main

  $(".global_main").height($(window).height() - $(".global_header").eq(0).outerHeight());

  $('.global_main').width($(window).width() - $('.global_slide').eq(0).outerWidth()).show();

  };