ASP Development Skills Collection (3)

Source: Internet
Author: User
Skills

embed a different page

<iframe class= "Tbgen" style= "top:2px" id= "Uploadfiles" src= "upload.asp" frameborder=0 scrolling=no width= "250" height= "></iframe>"

-------------------------------------
In fact, you can also use the <!--#include file= "fuck.asp"-->

All selected

<script language=javascript>
function Checkall (form)
{
for (Var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.name!= "Chkall")
e.checked = form.chkAll.checked;
}
}
</script>
Reference:
<TD width= "height=" ><input name= "Chkall" type= "checkbox" id= "Chkall" Onclick=checkall (this.form) value= "checkbox" > select all </td> displayed on this page

Small lattice:
<input name= ' username ' type= ' checkbox ' id= ' username ' value= ' <%=cstr (Rsview ("username"))%> ">

How do I handle errors that occur while the page is executing?

<%@ language= "VBScript"%>
<%
Response.Buffer = True ' Open page buffering
On error Resume Next ' Open fault handling
............' ASP code
%>

<%
If err.number <> 0 Then ' error handling
Response.Clear ' Clear buffer
%>

<HTML> ' Show error Message page
<HEAD>
<TITLE> Page Error Reporting </TITLE>
</HEAD>

<body bgcolor= "#C 0C 0c0" >
<font color=red>
<p> Page Error Reporting </p>

Error number: <%= Err.Number%><br>
Error description: <%= err.description%><br>
Error Source: Err.Source%><br>, Source <%=
Error occurrence line: <%= err.line%><br>
</BODY>
</HTML>
<%
End If
%>

Favorites Icon .

Add the following content to the head section:
<link rel= "Shortcut ICON" href=http://www.alleasy.com.cn/alleasy.ico>

Add an icon to the Address bar (the icon must be. ico format and will be available after collection)
Join <link rel= "shortcut icon" href= "Favicon.ico" in Head >

Validate Submission form (regular expression application)

<script language= "JavaScript" >
<!--
function Checkform ()
{
if (Loginid.value = "")
{
Alert ("Please fill in your sign-in name!") ");
Loginid.focus ();
return false;
}
var filter=/^\s*[. a-za-z0-9_-]{5,15}\s*$/;
if (!filter.test (Loginid.value)) {
Alert ("User name is not filled out correctly, please fill in again!") Available character identifier (A-Z-A-Z 0-9 _-.) No less than 5 characters in length, no more than 15 characters, be careful not to use spaces. ");
Loginid.focus ();
Loginid.select ();
return false;
}
if (Password.value = "")
{
Alert ("Please fill in your password!") ");
Password.focus ();
return false;
}
var filter=/^\s*[. a-za-z0-9_-]{5,15}\s*$/;
if (!filter.test (Password.value)) {
Alert ("Password is not filled in correctly, please fill in again!") Available character identifier (A-Z-A-Z 0-9 _-.) Length not less than 5 characters, not super

Over 15 characters, be careful not to use spaces. ");
Password.focus ();
Password.select ();
return false;
}
if (Password.value!= confirmpassword.value)
{
Alert ("Please fill out the password two times inconsistent, please fill in again!") ");
Confirmpassword.focus ();
return false;
}
if (Companyname.value = "")
{
Alert ("Please fill in your company name!") ");
Companyname.focus ();
return false;
}
var filter=/^[a-za-z][a-za-z0-9._-]*@ ([a-za-z0-9-_]+\.) + (com|gov|net|com\.cn|edu\.cn) $/;
if (!filter.test (Document.myform.Email.value)) {
Alert ("Incorrect mailbox format!");
Document.myform.Email.focus ();
return false;
}
Myform.submit ();
return true;
}
-->
</SCRIPT>

Unified, it's all written in the future.
<form method= "POST" name= "MyForm" action= "checkreg.asp" >
</form>

<input type= "button" name= "Submit" value= "submitted" >

[1] [2] Next page



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.