【问题标题】:trying to resize an iframe尝试调整 iframe 的大小
【发布时间】:2013-01-02 17:51:22
【问题描述】:

好的,我已经从这里尝试了两种解决方案(论坛,到目前为止还没有发生任何事情)这是我的代码:

<script>
<!---tried this without success-->
$("#mySupport").resizable();
alert("Hello! I am an alert box!!");
<!--also tried this from the forums-->
$(document).ready(function(){
    $('#mySupport', window.parent.document).height($(document).height());
});

</script>
<iframe id="mySupport" width="960" height="900" seamless src="https://enterraglobal.zendesk.com/"  scrolling="no">



</iframe>
<!--I don't know probably I'm missing something-->

【问题讨论】:

    标签: jquery iframe resizable


    【解决方案1】:
    $(document).ready(function(){
        $("#mySupport").height("100px");
    });
    

    【讨论】:

      【解决方案2】:

      我认为您正在尝试将 iframe 设置为与外部文档相同的大小。如果是这样:

      $(document).ready(function()
      {
          $('#mySupport').height( $(document).height() ); 
          $('#mySupport').width( $(document).width() ); 
      });
      

      jsfiddle

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2014-06-04
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-08-20
        • 2011-08-02
        相关资源
        最近更新 更多