Recommended: Asp currency capitalization conversion function Function AtoC(a As Currency) As String 'Description: This function is suitable for currency conversions of less than one trillion yuan. The value of A is allowed to be at most two decimal places' define two strings. Here Chinese characters and numbers are calculated in one place Dim String1 As String 'Definition as follows Dim String2 As String 'Definition as follows Dim String3 As String 'From the original A
<% setrecordset1=server.createobject(adodb.recordset) exec=SELECT*FROMnewswhereid=&id recordset1.Openexec,conn,1,1 %> <tablewidth=85%border=0align=centercellpadding=3cellspacing=0> <tr><td> ......... <% IfRequest(page)=Then pageNum=0 Else pageNum=Request(page) Endif ContentStr=split(recordset1(detail),||) Fori=pageNumtopageNum %> <%=ContentStr(i)%> <%Next%> </td> </tr> <%ifubund(ContentStr)>=1then%> <tr> <tdheight=30>This article is divided into <% Forp=0toubund(ContentStr) ifp+1=Request(page)+1then a=<fontcolor=red> aa=</font> else a= aa= endif %> <ahref=detail.asp?ID=<%=request(ID)%>&page=<%=p%>><%=a%><%=p+1%><%=aa%></a> <%Next%> Page</td> </tr> <%endif%> |
When adding an article, just add the splitter|| wherever you want to paging.
Share: How to limit the method that can only be entered in Chinese. function isCharsInBag (s, bag) { var i,c; for (i = 0; i s.length; i++) { c = s.charAt(i);//The character in the string s if (bag.indexOf(c) -1) return c; } return ; } Check function: function ischinese(s) { var errorChar; var badChar = ABCDEFGHIJKLMNOPQRST