首先,讓我明確你的疑慮,我在找什麼。我用Google搜索已經和成噸的結果,但我的問題是:如何在我的jsp Web應用程序中顯示「加載更多故事」?
我想告訴Load more stories
到我的web應用程序,它獲取從MySQL數據庫的故事,是這樣的:
<div align="center"><font color="#CC0099" size="4">★·.·´¯`·.·★ HAPPY NEW YEAR ★·.·´¯`·.·★<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>
能否請您只是幫助我,我有很多故事,現在我想改變它像'加載更多的故事。
當然,幫助將不勝感激!
閱讀了關於如何使用Ajax – charlietfl