一个新闻页,这个新闻页有评论,但是评论页是我很多模块公用的,评论里面有分页,但是打开这个新闻业的时候那个层不刷新,评论是出不来了,所以想要的是打开网页的时候就自动刷新一次评论分页的那个层。求js指教ajaxjsjquery

解决方案 »

  1.   

    加载页面时,ajax调用后台,刷新页面内容。
      

  2.   

    可以用iframe,
    或者设置成有人评论了页生成该页面
    ajax调用后台,这样用还不如生成一次算了,(当然论坛除外,评论比较频繁的)
      

  3.   

    <body>
    <center>
    <div id="contener">
    <div id="main">
     <div class="main">
       <div  class="news">
    <c:set var="news" value="${returnMap.object}"></c:set>
    <h1 align="left">${news.newsTitle}<br /> 
       </h1>${news.newsContent} <br />
    <div class="comment">
    <h4 id="comment">评论</h4>
     <c:if test="${returnMap.power==1 }">  
    <form name="addReview" method="post">
    <input name="contentId" type="hidden" value="${news.id }" />
    <input name="modelName" type="hidden" value="${returnMap.moduleName }" />
    <input name="moduleId" type="hidden" value="1" />
    <input name="content" type="text"  />
    <input  type="button" onClick="usersReview()" value="评论"  class="button" />
    </form>
    </c:if>
    <div id="reviewList">
    </div>
    </div>
    </body>有那个层<div id="reviewList"></div> 这个是加载评论列表的,就是我打开页面的时候需要加载。默认肯定不会去加载这个层里面的东西的
      

  4.   

    CSS的元素浮动--float属性 http://rongzhixueyuan.i.sohu.com/blog/view/256760324.htm
    oracle主键约束 创建主键约束 http://ruizhijishu.i.sohu.com/blog/view/256771842.htm
    使用Visual Studio 2012创建样式表CSS http://rongzhixueyuan.i.sohu.com/blog/view/256787942.htm
    在Visual Studio 2012中创建用户控件 http://ruizhijishu.i.sohu.com/blog/view/256794109.htm

    oracle主键约束 创建主键约束 http://rzchina.blog.163.com/blog/static/18110519720132791251698/
    在iPhone模拟器上的图片进行旋转 http://yuanzhitushu.blog.163.com/blog/static/217424102201327105339717/
    使用Visual Studio 2012创建样式表CSS http://rongzhixueyuan.i.sohu.com/blog/view/256787942.htm
     在Visual Studio 2012中创建用户控件 http://yuanzhitushu.blog.163.com/blog/static/21742410220132722859585/

    VC中在一个程序中调用另一个程序 http://blog.sina.com.cn/s/blog_768552710101cwig.html
    如何进行android中的启动和关闭WiFi服务 http://blog.sina.com.cn/s/blog_c2c80ac901015j2h.html
     CSS的元素浮动--float属性 http://blog.sina.com.cn/s/blog_768552710101cwo2.html
     在Visual Studio 2012中创建用户控件 http://blog.sina.com.cn/s/blog_c2c80ac901015j7f.html
    使用Visual Studio 2012创建样式表CSS http://blog.sina.com.cn/s/blog_c2e2504d0101acgv.html
    在iPhone模拟器上的图片进行旋转 http://blog.sina.com.cn/s/blog_c2e2504d0101acjt.html
     在Visual Studio 2012中创建用户控件 http://blog.renren.com/share/356004141/15432970301
     CSS的元素浮动--float属性 http://blog.renren.com/share/356004141/15434133822

    在iPhone的图片进行旋转 http://zhan.renren.com/rongzhijishu?gid=3602888498037184104
    VC中在一个程序中调用另一个程序 http://zhan.renren.com/roongzhijishu?from=bar
    如何进行android中的启动和关闭WiFi服务 http://zhan.renren.com/rongzhijishu?gid=3602888498037191213
    oracle主键约束 创建主键约束


    如何进行android中的启动和关闭WiFi服务 http://hi.baidu.com/zhiyuanjishu/item/6683b93576a25fec96f88dd6
    oracle主键约束 创建主键约束 http://hi.baidu.com/yuanzhitushu/item/518755b03a3a2a732aebe317
    在Visual Studio 2012中创建用户控件 http://hi.baidu.com/zhiyuanjishu/item/19aa38f4c54ffd793c148501
    CSS的元素浮动--float属性 http://hi.baidu.com/yuanzhitushu/item/17809d944088ecb858146150



    使用Visual Studio 2012创建样式表CSS http://k.ifeng.com/6846593/10080943
    在iPhone的图片进行旋转 http://k.ifeng.com/6846593/10081594
    如何进行android中的启动和关闭WiFi服务 http://k.ifeng.com/6846593/10082440
    VC中在一个程序中调用另一个程序



    在iPhone的图片进行旋转 http://www.topit.me/user/topic/337970
    VC中在一个程序中调用另一个程序 http://www.topit.me/user/topic/337974