| Asp编程 | PHP编程 | .Net编程 | Xml编程 | Access | Mssql | Mysql
经典实用的基础asp程序整理
2008-05-14 10:29 来源: 网络搜集 作者:pchome 网友评论 0 条 浏览次数 0

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

javascript:window.close();

提交的图片连接写

javascript:document.Form1.submit();

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

以下为引用的内容:
 <a href="del.asp?id=<%=rs("rowid")%>" ONCLICK="javascript:return confirm('真的要删除数据吗?')">删除</a>

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>

相关主题:

推荐下载

网友评论

关于我们 | 服务条款 | 隐私说明 | 意见反馈 | 业务合作 | 赞助我们 | 知识产权 | 使用帮助
CopyRight (2005-2008) | 抚州生活网 | VeryCMS 3.0 备案号:赣ICP备06005705号