11. 报错并返回if rs.bof and rs.eof then ‘还是有问题
response.write""
end if
-----------------------------------
这个是跳转。
alert('<%=intOperationInfo%>');
window.navigate('ChangePwd.asp');
12. 从VBS到JS,混用 <%
dim checkpwdconfig
checkpwdconfig=split(addation,"/")
%>
alert("<%=checkpwdconfig(0)%>")
13. 弹出窗口
function openaddnew()
{
subWindow=window.open("../Edit/PasswordConfigEdit.asp?method=new",'','scrollbars=yes,left=120,top=60,height=250,width=500,menubar=no,location=no,toolbar=no,resizable=yes','')
subWindow.opener = this;
}
用一个连接调用:
请修改密码 onClick="openaddnew()"图片调用:
.gif" onClick="openaddnew()">14. 分页
<%
if request("pageno")<>"" then
pageno=int(request("pageno"))
else
pageno=1
end ifsql="select * from news where [language]='中文' and bigclassname='新闻' order by id desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,3
rs.pagesize=20
if rs.eof then
pageno=0
else
rs.absolutepage=pageno
end if
%>
==========================================
共<%=rs.recordcount%>条,<%=pageno%>/<%=int(rs.pagecount)%>页,每页<%=rs.pagesize%>条
<%if pageno>1 then%>
<%
end if
if int(pageno)<>int(rs.pagecount)then
%>
<%end if%>
<%rs.close%>
<%call CloseConn()
%>15. 数据库更新 sql="select * from [user] where username='"&request("username")&"'"
rs.Open sql,Conn,1,3
rs("usermail")=Request("usermail")
rs("userhome")=Request("userhome"))
rs.update
rs.close16. 关闭独立窗口
17. 极细表格
Email : /^\w+([-+.]\w+)*@\w+([-.]\\w+)*\.\w+([-.]\w+)*$/,
Phone : /^((\(\d{3}\))|(\d{3}\-))?(\(0\d{2,3}\)|0\d{2,3}-)?[1-9]\d{6,7}$/,
Mobile : /^((\(\d{3}\))|(\d{3}\-))?13\d{9}$/,
Url : /^http:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\'NULL!]*([^<>\"\"])*$/,
IdCard NULL^\d{15}(\d{2}[A-Za-z0-9])?$/,
Currency NULL^\d+(\.\d+)?$/,
Number NULL^\d+$/,
Zip NULL^[1-9]\d{5}$/,
QQ NULL^[1-9]\d{4,8}$/,
Integer NULL^[-\+]?\d+$/,
Double NULL^[-\+]?\d+(\.\d+)?$/,
English NULL^[A-Za-z]+$/,
Chinese NULLnbsp; /^[\u0391-\uFFE5]+$/,
UnSafe NULL^(([A-Z]*|[a-z]*|\d*|[-_\~!@#\$%\^&\*\.\(\)\[\]\{\}<>\?\\\/\'\"]*)|.{0,5})$|\s/,19. Left应用(控制字数)function title(str)
if len(trim(str))>=28 then
title=left(trim(str),27)&"..."
else
title=trim(str)
end if
end function 20. 判断浏览器

