如何显示“加载更多故事"在我的jsp Web应用程序中? [英] How to show "load more stories" in my jsp web application?

查看:60
本文介绍了如何显示“加载更多故事"在我的jsp Web应用程序中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,让我清除您对我正在寻找的东西的怀疑.我已经用Google搜索了很多结果,但是我的问题是:

Firstly, Let me clear your doubt that what I'm looking for. I googled already and tons of result but My question is:

我想在我的Web应用程序中显示Load more stories,它正在从MySql数据库中获取故事,例如:

I want to show Load more stories into my web application and it's fetching stories from MySql database, something like:

<div align="center"><font color="#CC0099" size="4">&#9733;·.·´¯`·.·&#9733; HAPPY NEW YEAR &#9733;·.·´¯`·.·&#9733;<br></font></div>
<%
    try{
        Class.forName("com.mysql.jdbc.Driver");
        Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/news", "foo", "foo");
        Statement st=con.createStatement();
        ResultSet rs=st.executeQuery("select * from main_news order by news_id desc");
            while(rs.next()){
                String my_news=rs.getString("my_news");
    %>
<div class="wpb_wrapper" style="border-bottom: 1px solid #bcbcbc;">
<section>
<!-- Here, would be my news.... -->
    <%=my_news %>
</section>
</div><br><br><br>
<%
            }
    }
    catch(Exception e){
        e.printStackTrace();
    }
%>
<p style="text-align:center;">No more stories here..</p> 
</div>

您能帮我吗,我有很多故事,现在我想将其更改为加载更多故事".

Can you please just help me, I've tons of stories and now i want to change it something like `Load more Stories.

当然可以,谢谢您的帮助!

Surely, Help would be appreciated!!

推荐答案

这正是您所需要的.

https://github.com/paulirish/infinite-scroll ->可以是使用jQuery集成

https://github.com/paulirish/infinite-scroll --> can be integrated using jQuery

http://www.infinite-scroll.com/->向下滚动至底部看看效果.

http://www.infinite-scroll.com/ --> scrolldown to the bottom to see the effect.

这篇关于如何显示“加载更多故事"在我的jsp Web应用程序中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆