Classic and practical Basic ASP code collation

Source: Internet
Author: User
Tags count modify window

  1. Close the window and write on the connection of the picture

Javascript:window.close ();


Submit a picture connection write

Javascript:document. Form1.submit ();


Confirmation dialog box appears before deleting:

<a href= "Del.asp?id=<%=rs (" rowID ")%>" > Delete </a>


  2, with VBScript pop-up prompt box and then jump to the specified page

<%
Response.Write "<script language= ' JavaScript ' >alert (" submitted successfully! "); location.href= "" addbook.asp "";</script> "
%>


  3, the page to wait .... Script Description:
Add the following code to the

<script language= "JavaScript" >
document.write ("<font size=6 color=blue face= ' italics _gb2312 ' ><B> is loading the homepage of the Web teaching website, please wait a moment." </B></font> ");
Window.clear;
Window.location.href= "http://www.webjx.com";
</SCRIPT>


  4, in the text directly modify the record, and then point to modify Save record

<%count=0
Do as not (rs.eof or RS.BOF) and Count<rs. PageSize%>
<form action= "webgroupedit.asp" method= "post" name= "Groupedit" >
<tr bgcolor= "E9F3FF" >
<td> <%=rs ("id")%> <input name= "B" type= "hidden" id= "B" value= "<%=rs (" id ")%>" >
<input name= "Currpage" type= "hidden" id= "Currpage" value= "<%=page%>" ></td>
&LT;TD height= "><input name=" a "type=" text "id=" a "value=" <%=rs ("Memgroupname")%> "size=" maxlength = "M" >
</td>
&LT;TD height= "><input name=" C "type=" text "id=" C "value=" <%=rs ("remark")%> "size=" maxlength= "30" ></td>
<td><input type= "Submit" name= "Submit" value= "modified" ></td>
<td><div align= "center" ><a href= "Webgroupdel.asp?id=<%=rs" ("id")%>&page=<%=page%> " > Delete </a></div></td>
</tr>
</form>
<%
Count=count+1
Rs.movenext
Loop
%>


  5, automatic calculation problem:

<input type= "hidden" name= "Selvalue" >
<select name= "Select1" onchage= "javascript:document.form1.selvalue.value=this.options[ This.options.selectedindex].text ">
<option value= "1" > Sina </option>
<option value= "2" > Baidu </option>
<option value= "3" > China net </option>
<option value= "4" > Tencent </option>
</SELECT>



Related Article

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.