您现在的位置:计算机技术学习网 > 技术中心 > WEB编程 > ASP >

一个免费的邮件列表源程序(三)

来源:网络 责任编辑:栏目编辑 发表时间:2013-07-01 13:20 点击:
Subscribe.asp
<%@ Language=JavaScript %>

<!--#include file = "include/SetGlobals.asp"-->
<!--#include file = "include/DBPath.asp"-->

<%
// output relevant meta tags
Init( "Subscription" );

// output common top of page
Header( <a href="work.asp">Work</a> --> Subscription, 3 );

// output page content
Content ( );

// output common bottom of page
Footer( );
%>

<% /* standard page elements */ %>
<!--#include file = "utils/Init.asp"-->
<!--#include file = "utils/Database.asp"-->
<!--#include file = "utils/Header.asp"-->
<!--#include file = "utils/Footer.asp"-->

<%
// ============================================
// the content of this page
// ============================================
function Content ( )
{
   Out ( <td width="20%">&nbsp;</td> );
   Out ( <td width="60%"> );
    
      // if the form has an email address, validate it first
      // so that if it fails we can show the form to fix
      var sEmail = "";
      var bSubmitted = (Request.Form.Count > 0);

      // has the form been submitted?
      if ( bSubmitted )
      {
         // get the email address from the form...
          sEmail = "" + Request.Form ( "email" );

         // validate the email address and moan if it fails
         if ( !IsValidEmail ( sEmail ) )
         {
            Out ( <h5><font color="red">" + sEmail + " <i>appears</i> to be an invalid email address - please try again!</font></h5> );
            Out ( <p><font color="red">If you disagree, please <a href="Contact.asp">contact me</a> directly.</font><p> );
            // pretend the form hasn been sent yet
            bSubmitted = false;
         }
      }

      // show the form if not submitted yet
      if ( !bSubmitted )
      {
         Out ( If youe interested in hearing whenever a new article is posted, or an existing one is updated, type in your email address below and hit <b>Subscribe!</b> );

    相关新闻>>

      发表评论
      请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
      用户名: 验证码:点击我更换图片
      最新评论 更多>>

      推荐热点

      • WAP常见问题问答大全(四)
      • ASP开发必备:WEB打印代码大全
      • ASP调用系统ping命令
      • asp缓存技术
      • ASP教程:第三篇 ASP基础
      • 用ASP+XML打造留言本(4)
      • 关于ASP Recordset 分页出现负数解决方法及建议
      • 用asp怎样编写文档搜索页面(5)
      • ASP处理多关键词查询实例代码
      网站首页 - 友情链接 - 网站地图 - TAG标签 - RSS订阅 - 内容搜索
      Copyright © 2008-2015 计算机技术学习交流网. 版权所有

      豫ICP备11007008号-1