找个3页的,看看前两页是否大小(或文字个数)(图片用html代码算)相同,如果不同(差别较多)那就根本是两页,不是分页
解决方案 »
- No bean named 'cxf' is defined怎么解决
- tomcat连接池,重复多次调用方法出错: Connection is closed
- 论坛中的结贴干嘛用
- 学习Ajax时,遇到的一个关于IE浏览器很怪的问题
- 内外网相互之间怎么收发邮件
- 为什么凤凰网的响应速度那么的快?
- 现在在学习jsp,想用mvc框架实现jsp页面的分页查找!师兄师姐们帮帮我!万分感谢!
- 关于jsp在其他机器上的转移问题!
- 网上 fuzhe(令狐虫) 给了一个下载文件的servlet 程序,但在我这有点问题????
- 这个简单的if语句咋就有错误了呢?
- 在jsp中如何存取oracle中的long类型字段(在线等)
- 大喉一声----------谁能帮我
======================
function submitPostIfRame(mode){
var sMarkup = doc_html.getHTML(); //从html编辑器中取数据
with(document.forms[0]){
doc_html.document.open();
doc_html.document.write(sMarkup);
doc_html.document.close();
doc_html.document.body.innerHTML = sMarkup;
var oBody=doc_html.document.body;
var oHTML="";
for(var i=0;i<oBody.childNodes.length;i++){
if(i!=oBody.childNodes.length-1){
if(oBody.childNodes[i].nodeType==3){
oHTML+=oBody.childNodes[i].nodeValue+"{#CMS-PAGINATION-SYMBOL#}";
}else{
oHTML+=oBody.childNodes[i].outerHTML+"{#CMS-PAGINATION-SYMBOL#}";
}
}else{
if(oBody.childNodes[i].nodeType==3){
oHTML+=oBody.childNodes[i].nodeValue;
}else{
oHTML+=oBody.childNodes[i].outerHTML;
}
}
}
news_content.value = oHTML
}
return true;
}ASP脚本部分
===============
Function calculate_pagination(strContent, pSize)
On Error Resume Next
Dim aCon, intfor, intCount, strTemp, strTemp2
aCon = Split(strContent, "{#CMS-PAGINATION-SYMBOL#}", -1, 1)
intCount = UBound(aCon)
strTemp = ""
strTemp2 = ""
Page = 1
For intfor = 0 To intCount
strTemp = strTemp & aCon(intfor)
strTemp2 = strTemp2 & RemoveHTML(aCon(intfor))
'strTemp2 = strTemp2 & aCon(intFor)
If Len(strTemp2) >= pSize Then
Page = Page + 1
strTemp = ""
strTemp2 = ""
End If
Next
'If strTemp2 <> "" Then Page = Page - 1
calculate_pagination = Page
If Err.Number <> 0 Then
calculate_pagination = 1
Err.Clear
End If
End FunctionFunction get_page_text(strContent, pagenum, totalpage, pSize)
aCon = Split(strContent, "{#CMS-PAGINATION-SYMBOL#}", -1, 1)
intCount = UBound(aCon)
strTemp = ""
strTemp2 = ""
Page = 1
For intfor = 0 To intCount
strTemp = strTemp & aCon(intfor)
strTemp2 = strTemp2 & RemoveHTML(aCon(intfor))
'strTemp2 = strTemp2 & aCon(intFor)
If Len(strTemp2) >= pSize Then
If pagenum = Page Then
get_page_text = strTemp
Exit For
End If
Page = Page + 1
strTemp = ""
strTemp2 = ""
End If
Next
If strTemp2 <> "" And pagenum > Page - 1 Then get_page_text = strTemp
End Function