我的jsp页面如何用jquery实现无刷新效果
<bodystyle="word-break:break-all;"><divclass="mian"><divid="divChatLogs"class="div2">...
<body style="word-break:break-all;">
<div class="mian">
<div id="divChatLogs" class="div2">
<s:iterator value="pageResult.list">
<div align="left">
<div>
<span class="zi1"><s:if test='wytUserId.displayName==""'>
<s:property value=""/>
</s:if><s:property value="wytUserId.displayName"/> <s:date name="chatTime" format="yyyy-MM-dd HH:mm:ss"/></span>
</div>
<div>
<span class="zi"><s:property value="chatContent" escape="false"/></span>
</div>
</div>
<br />
</s:iterator>
</div>
</div>
<div id ="footer">
<form name="form1" style="margin:0px;padding:0px;" method="post" action="pc.chatlogs.doSearchSingleChatLogs.do">
<table width="315" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="text" value="${chatStartDate}" name="s" class="Wdate" id="d11"
onclick="WdatePicker({onpicking:function(dp){$('chatStartDate').value = dp.cal.getNewDateStr();blurSubmit();}})"></td>
<td></td>
<td align="right">
<s:hidden name="pC_UnifiedLogin" />
<s:hidden name="user_UserName" />
<input type ="hidden" name="chatStartDate" id="chatStartDate" value="${chatStartDate}"/>
<input type="hidden" name="pageResult.current" id="pageResult.current" value="${pageResult.current}"/>
<input type="hidden" name="pageResult.totalRecord" id="pageResult.totalRecord" value="${pageResult.totalRecord}"/>
<input type="hidden" name="wytChatLogs.wytUserId.displayName" value="${wytChatLogs.wytUserId.displayName}"/>
<input type="hidden" name="wytChatLogs.chatContent" value="${wytChatLogs.chatContent}"/>
<input type="hidden" name="wytChatLogs.chatTime" value="${wytChatLogs.chatTime}"/>
<input type="button" name="Submit" id="start" class="btn" value="|<" onclick="turnPage(parseInt($('pageResult.current').value)-(parseInt($('pageResult.current').value)-1));" />
<input type="button" id="back" name="pre" class="btn" value="<" onclick="turnPage(parseInt($('pageResult.current').value)-1);" />
<span class="zi">第<input type="text" oncontextmenu="return(false)" value="${pageResult.current}" name="textfield" id="page" class="text" onkeydown="if(event.keyCode == 13){$('pageResult.current').value=$('page').value;turnPage($('page').value);}" onkeypress="if (event.keyCode < 45 && event.keyCode>13 && enent.keyCode<13 || event.keyCode > 57) event.returnValue = false;"/>页/${pageResult.totalPage}页</span>
<input type="button" name="next" class="btn" id="next" value=">" onclick="turnPage(parseInt($('pageResult.current').value)+1);" />
<input type="button" name="Submit4" id="end" class="btn" value=">|" onclick="turnPage(parseInt($('pageResult.totalRecord').value))" />
</td>
</tr>
如何用jquery把数据获得实现无刷新效果,这是一个和QQ聊天一样的,就是实现点下一页的时候不刷, 展开
<div class="mian">
<div id="divChatLogs" class="div2">
<s:iterator value="pageResult.list">
<div align="left">
<div>
<span class="zi1"><s:if test='wytUserId.displayName==""'>
<s:property value=""/>
</s:if><s:property value="wytUserId.displayName"/> <s:date name="chatTime" format="yyyy-MM-dd HH:mm:ss"/></span>
</div>
<div>
<span class="zi"><s:property value="chatContent" escape="false"/></span>
</div>
</div>
<br />
</s:iterator>
</div>
</div>
<div id ="footer">
<form name="form1" style="margin:0px;padding:0px;" method="post" action="pc.chatlogs.doSearchSingleChatLogs.do">
<table width="315" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="text" value="${chatStartDate}" name="s" class="Wdate" id="d11"
onclick="WdatePicker({onpicking:function(dp){$('chatStartDate').value = dp.cal.getNewDateStr();blurSubmit();}})"></td>
<td></td>
<td align="right">
<s:hidden name="pC_UnifiedLogin" />
<s:hidden name="user_UserName" />
<input type ="hidden" name="chatStartDate" id="chatStartDate" value="${chatStartDate}"/>
<input type="hidden" name="pageResult.current" id="pageResult.current" value="${pageResult.current}"/>
<input type="hidden" name="pageResult.totalRecord" id="pageResult.totalRecord" value="${pageResult.totalRecord}"/>
<input type="hidden" name="wytChatLogs.wytUserId.displayName" value="${wytChatLogs.wytUserId.displayName}"/>
<input type="hidden" name="wytChatLogs.chatContent" value="${wytChatLogs.chatContent}"/>
<input type="hidden" name="wytChatLogs.chatTime" value="${wytChatLogs.chatTime}"/>
<input type="button" name="Submit" id="start" class="btn" value="|<" onclick="turnPage(parseInt($('pageResult.current').value)-(parseInt($('pageResult.current').value)-1));" />
<input type="button" id="back" name="pre" class="btn" value="<" onclick="turnPage(parseInt($('pageResult.current').value)-1);" />
<span class="zi">第<input type="text" oncontextmenu="return(false)" value="${pageResult.current}" name="textfield" id="page" class="text" onkeydown="if(event.keyCode == 13){$('pageResult.current').value=$('page').value;turnPage($('page').value);}" onkeypress="if (event.keyCode < 45 && event.keyCode>13 && enent.keyCode<13 || event.keyCode > 57) event.returnValue = false;"/>页/${pageResult.totalPage}页</span>
<input type="button" name="next" class="btn" id="next" value=">" onclick="turnPage(parseInt($('pageResult.current').value)+1);" />
<input type="button" name="Submit4" id="end" class="btn" value=">|" onclick="turnPage(parseInt($('pageResult.totalRecord').value))" />
</td>
</tr>
如何用jquery把数据获得实现无刷新效果,这是一个和QQ聊天一样的,就是实现点下一页的时候不刷, 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询