【问题标题】:Opera jQuery load causes load of whole pageOpera jQuery 加载导致加载整个页面
【发布时间】:2010-11-19 10:11:39
【问题描述】:

这是我页面中存在问题的部分。

<div id="notice_box" class="center">
  <div id="notice_cont"></div>
<script>
    function notice(more)
    {
        $('#notice_cont').load('notice.php?more_notice='+more);
    }
</script>
</div>
    <div id="notice_box_foot">
       <img src="images/notice-box-bl.png" class="left">
       <img src="images/notice-box-br.png" class="right">
     </div>
</div>

脚本应该用notice.php 填充#notice_cont .....而不是用它填充整个页面....在除opera 之外的所有浏览器中都可以正常工作:s

【问题讨论】:

  • 从哪里调用它?
  • 脚本在上面做什么?
  • notice.php 返回了什么?可能返回的容器具有高度属性 = 100%。尝试限制notice_cont div的max_height
  • 你确定在调用函数时构建了 DOM 吗?什么时候调用?
  • 这样调用

标签: jquery opera


【解决方案1】:

是不是因为你的脚本标签在 div 里面。尝试将其移至 .

【讨论】:

    【解决方案2】:

    请尝试使用W3C HTML validator 验证notice.php 的输出。如果您插入的 HTML 无效,则可能会出现您描述的症状,例如缺少结束标签。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-06
      • 1970-01-01
      • 2023-01-08
      • 2014-11-10
      • 2011-10-06
      • 1970-01-01
      相关资源
      最近更新 更多