推薦:asp貨幣大寫轉(zhuǎn)換函數(shù)Function AtoC(a As Currency) As String '說明:本函數(shù)適合于萬億以下的貨幣轉(zhuǎn)換,允許A的值是最多兩位小數(shù) '定義兩個字符串,此處漢字與數(shù)字均按一位計算 Dim String1 As String '如下定義 Dim String2 As String '如下定義 Dim String3 As String '從原A
<% set recordset1=server.createobject("adodb.recordset") exec="SELECT * FROM news where id="&id recordset1.Open exec,conn,1,1 %> <table width="85%" border="0" align="center" cellpadding="3" cellspacing="0"> <tr> <td > .......
<% If Request("page")="" Then pageNum=0 Else pageNum=Request("page") End if ContentStr=split(recordset1("detail"),"||") For i=pageNum to pageNum %> <%=ContentStr(i)%> <% Next %> </td> </tr> <%if ubound(ContentStr)>=1 then%> <tr> <td height="30" >本文共分 <% For p = 0 to ubound(ContentStr) if p+1= Request("page")+1 then a="<font color=red>" aa="</font>" else a="" aa="" end if %> <a href="detail.asp?ID=<%=request("ID")%>&page=<%=p%>"><%=a%><%=p+1%><%=aa%></a> <% Next %> 頁 </td> </tr> <%end if%> |
添加文章時,在想分頁的地方,加入分割符 || 即可。
分享:怎樣限制只能中文輸入的方法。function isCharsInBag (s, bag) { var i,c; for (i = 0; i s.length; i++) { c = s.charAt(i);//字符串s中的字符 if (bag.indexOf(c) -1) return c; } return ; } 檢查函數(shù): function ischinese(s) { var errorChar; var badChar = ABCDEFGHIJKLMNOPQRST