ASP Development Skills Collection (2)

Source: Internet
Author: User
Skills One by one . Error and return if Rs.bof and rs.eof then ' There's still a problem.
Response.Write "<script Language=javascript>alert (' Can't find it! ');"
Response.Write "Javascript:history.go ( -1) </SCRIPT>"
End If
-----------------------------------
This is a jump.
<script language= "JavaScript" >
Alert (' <%=intOperationInfo%> ');
Window.navigate (' changepwd.asp ');
</Script> A . from VBS to the JS , mixed<%
Dim checkpwdconfig
Checkpwdconfig=split (Addation, "/")
%>
<script language= "JavaScript" >
Alert ("<%=checkpwdconfig (0)%>")
</script> A . pop-up window<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> call with a connection:
<a href= "" # "> Please modify password </a> picture call:
.gif "> . Paging<!--#include file= "conn.asp"-->
<%
If Request ("PageNo") <> "then
Pageno=int (Request ("PageNo"))
Else
Pageno=1
End Ifsql= "SELECT * from news where [language]= ' Chinese ' and bigclassname= ' news ' 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
%>
==========================================
Total <%=rs.recordcount%>, <%=pageno%>/<%=int (rs.pagecount)%> page, per page <%=rs.pagesize%> bar
<a href= "Manage.asp?pageno=1" > Home </a>
<%if pageno>1 then%>
<a href= "Manage.asp?pageno=<%=int (pageno) -1%>" > Prev </a>
<%
End If
if int (pageno) <>int (Rs.pagecount) Then
%>
<a href= "Manage.asp?pageno=<%=int (pageno+1)%>" > next page </a>
<%end if%>
<a href= "Manage.asp?pageno=<%=int (rs.pagecount)%>" > End </a>
<%rs.close%>
<%call Closeconn ()
%> . Database UpdateSql= "SELECT * from [user] where username= '" &request ("username") & ""
Rs. Open sql,conn,1,3
RS ("Usermail") =request ("Usermail")
RS ("Userhome") =request ("Userhome"))
Rs.update
Rs.close . close a standalone window
<object id=closes type= "Application/x-oleobject" classid= "Clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" >< param name= "Command" value= "Close" >
</object>

<body>
<input type= "button" value= "Click my Close Window" >
</body> A . Very Fine table<table border= "1" cellpadding= "0" cellspacing= 0 "width=" "height=" "bordercolorlight=" "#000000" bordercolordark= "#FFFFFF" >
<tr>
<td> </td>
</tr>
</table> A . several regular expressionsRequire:/.+/,
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+)? $/,
中文版:/^[a-za-z]+$/,
Chinese:/^[\u0391-\uffe5]+$/,
UnSafe:/^ ([a-z]*|[ a-z]*|\d*| [-_\~!@#\$%\^&\*\.\ (\) \[\]\{\}<>\?\\\/\ ' \ "]*) |. {0,5}) $|\s/, Left Application (Control word count)function title (str)
If Len (Trim (str)) >=28 Then
Title=left ((str), &)
Else
Title=trim (str)
End If
End Function A . judge the browser<script language= "javascript1.2" >
<!--//
if (navigator.appname = ' Netscape ')
var language = Navigator.language;
Else
var language = Navigator.browserlanguage;


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.