|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
Windows本身的所有问题都会一成不变的也累加到了它的身上。安全性、稳定性、跨平台性都会因为与NT的捆绑而显现出来;技能 11. 报错并前往if rs.bof and rs.eof then ‘仍是有成绩
response.write"<SCRIPT language=JavaScript>alert('找不到!');"
response.write"javascript:history.go(-1)</SCRIPT>"
end if
-----------------------------------
这个是跳转。
<script language="javascript">
alert('<%=intOperationInfo%>');
window.navigate('ChangePwd.asp');
</Script>12. 从VBS到JS,混用 <%
dim checkpwdconfig
checkpwdconfig=split(addation,"/")
%>
<script language="javascript">
alert("<%=checkpwdconfig(0)%>")
</script> 13. 弹出窗口<script language=javascript>
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;
}
</script>用一个毗连挪用:
<a href=""#"">请修正暗码 </a>图片挪用:
<img name=submit1 src="../button_new<%=session("languageid")%>.gif" >14. 分页<!--#include file="conn.asp"-->
<%
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%>条
<a href="manage.asp?pageno=1">首页</a>
<%if pageno>1 then%>
<a href="manage.asp?pageno=<%=int(pageno)-1%>">上一页</a>
<%
end if
if int(pageno)<>int(rs.pagecount)then
%>
<a href="manage.asp?pageno=<%=int(pageno+1)%>">下一页</a>
<%end if%>
<a href="manage.asp?pageno=<%=int(rs.pagecount)%>">尾页</a>
<%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. 封闭自力窗口<head>
<OBJECT id=closes type="application/x-oleobject" classid="clsid:adb880a6-d8ff- 11cf-9377-00aa003b7a11"><param name="Command" value="Close">
</object>
</head>
<body>
<input type="button" value="点击我封闭窗口" >
</body>17. 极细表格<table border="1" cellpadding="0" cellspacing="0" width="32" height="32" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr>
<td> </td>
</tr>
</table> 18. 几个正则表达式Require : /.+/,
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]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$/,
IdCard : /^\d{15}(\d{2}[A-Za-z0-9])?$/,
Currency : /^\d+(\.\d+)?$/,
Number : /^\d+$/,
Zip : /^[1-9]\d{5}$/,
QQ : /^[1-9]\d{4,8}$/,
Integer : /^[-\+]?\d+$/,
Double : /^[-\+]?\d+(\.\d+)?$/,
English : /^[A-Za-z]+$/,
Chinese : /^[\u0391-\uFFE5]+$/,
UnSafe :/^(([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. 判别阅读器<SCRIPT LANGUAGE="javascript1.2">
<!--//
if (navigator.appName == 'Netscape')
var language = navigator.language;
else
var language = navigator.browserLanguage;
ASP.NET和ASP的比较,技术上比较已经没什么可说的了.新一代在大部分程度来说当然是比旧一代好了. 关键看你对所做软件的理解了.因人而定.会写的话也可能比ASP.NET写得更有效率和更方便重用 |
|