当前位置: 首页 > 图文教程 > 网络编程 > ASP > 经典实用的基础asp程序整理

ASP
JS复制特定内容到粘贴板
ASP+Access数据库安全设置方法小结
ADSI+ASP添加IP到IIS禁止访问列表中
ASP Google的translate API代码
最小asp后门程序
asp xml 缓存类
asp 过滤尖括号内所有内容的正则代码
ASP去掉字符串头尾连续回车和空格的Function
ASP IE地址栏参数的判断
SQL 注入式攻击的终极防范
ASP也使用ORM,给ASP上所有的SQL注入画上句号
判断Session的过期时间 采用JavaScript实时显示剩余多少秒
asp 动态生成rss(不成生xml文件)代码
ASP XML制作菜单管理程序
asp之自动闭合HTML/ubb标签函数附简单注释
asp 读取文件和保存文件函数代码
asp 随机字符串函数
asp form 表单验证函数
ASP 循环导入导出数据处理 不使用缓存
asp 数据库连接函数代码

ASP 中的 经典实用的基础asp程序整理


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-08-14   浏览: 253 ::
收藏到网摘: n/a

1、关闭窗口在图片的连接上写

javascript:window.close();

提交的图片连接写

javascript:document.Form1.submit();

删除之前出现确认对话框:

2、用VBScript弹出提示框然后跳转到指定页面

以下为引用的内容:
    <%
  Response.Write "<script language='javascript'>alert(""提交成功!"");location.href=""AddBook.asp"";</script>"
  %>

3、页面摘入等待。。。。脚本说明:

把如下代码加入<head>区域中

以下为引用的内容:
<SCRIPT LANGUAGE="JavaScript">
  document.write("<font size=6 color=blue face='楷体_GB2312'><B>正在载入细溪驿站首页,请稍等..</B></font>");
  window.clear;
  window.location.href=;
  </SCRIPT>

4、在Text直接修改记录,然后点修改保存记录

以下为引用的内容:
       <%count=0
  do while not (rs.eof or rs.bof) and count<rs.PageSize %>
  <form action="webGroupEdit.asp" method="post" name="GroupEdit" onSubmit="return Checkedit()">
  <tr bgcolor="E9F3FF">
  <td>&nbsp;<%=rs("id")%> <input name="b" type="hidden" id="b" value="<%=rs("id")%>">
  <input name="currpage" type="hidden" id="currpage" value="<%=page%>"></td>
  <td height="18"><input name="a" type="text" id="a" value="<%=rs("MemGroupName")%>" size="20" maxlength="50">
  </td>
  <td height="18"><input name="c" type="text" id="c" value="<%=rs("Remark")%>" size="25" maxlength="30"></td>
  <td><input type="submit" name="Submit" value=" 修改 " ></td>
  <td><div align="center"><a href="webGroupDel.asp?id=<%=rs("id")%>&page=<%=page%>" onClick="return check()">删除</a></div></td>
  </tr>
  </form>
  <%
  count=count+1
  rs.movenext
  loop
  %>


5、自动计算问题:

以下为引用的内容:
     <input type="hidden" name="selvalue">
  <SELECT NAME="select1" onChage="javascript:document.form1.selvalue.value=this.options[this.options.selectedIndex].text">
  <option value="1">新浪</option>
  <option value="2">百度</option>
  <option value="3">中华网</option>
  <option value="4">腾讯</option>
  </SELECT>