在ASP中使用FSO组件生成HTML页面

2016-01-29 17:47 20 1 收藏

在ASP中使用FSO组件生成HTML页面,在ASP中使用FSO组件生成HTML页面

【 tulaoshi.com - ASP 】

 

'共有两个页面index.htm是首页.程序比较简单,主要是用了ASP里的文件操作对象。

<!--index.htm-------------------------------------------------------------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"
<html
<head
<titleUntitled Document</title
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"
</head

(本文来源于图老师网站,更多请访问https://www.tulaoshi.com/asp/)

<body
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0"
  <tr
    <td<form name="form1" method="post" action="send.asp"
      <table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#CCFFFF"
        <tr
          <td height="20"<div align="center"发送消息</div</td
          </tr
        <tr
          <td<div align="center"
            <textarea name="msg" cols="100" rows="6"</textarea
          </div</td
          </tr
        <tr
          <td<div align="center"
              <input type="submit" name="Submit" value="Submit"
              <input type="reset" name="Submit2" value="Reset"
          </div</td
          </tr
      </table
    </form</td
  </tr
</table
</body
</html
'//send.asp

<%
function chan_time(shijian)'转换日期时间函数
 s_year=year(shijian)
 if len(s_year)=2 then s_year="20"&s_year
 s_month=month(shijian)
 if s_month<10 then s_month="0"&s_month
 s_day=day(shijian)
 if s_day<10 then s_day="0"&s_day
 s_hour=hour(shijian)
 if s_hour<10 then s_hour="0"&s_hour
 s_minute=minute(shijian)
 if s_minute<10 then s_minute="0"&s_minute
 chan_time=s_year & s_month & s_day & s_hour & s_minute
end function

(本文来源于图老师网站,更多请访问https://www.tulaoshi.com/asp/)

function chan_data(shijian)  '转换日期时间函数
 s_year=year(shijian)
 if len(s_year)=2 then s_year="20"&s_year
 s_month=month(shijian)
 if s_month<10 then s_month="0"&s_month
 s_day=day(shijian)
 if s_day<10 then s_day="0"&s_day
 chan_data=s_year & s_month & s_day
end function

function chan_file(shijian)'转换日期时间函数
 s_month=month(shijian)
 if s_month<10 then s_month="0"&s_month
 s_day=day(shijian)
 if s_day<10 then s_day="0"&s_day
 s_hour=hour(shijian)
 if s_hour<10 then s_hour="0"&s_hour
 s_minute=minute(shijian)
 if s_minute<10 then s_minute="0"&s_minute
 s_ss=second(shijian)
 if s_ss<10 then s_ss="0"&s_ss
 chan_file = s_month & s_day & s_hour & s_minute & s_ss
end function
 top="<html<head<titlenews</title</head<body"
 botom="</body</html"
 msg=request.Form("msg")
 msg=replace(msg,vbcrlf,"")
 msg=replace(msg,chr(9),"")
 msg=replace(msg," ","&nb

来源:https://www.tulaoshi.com/n/20160129/1502988.html

延伸阅读
标签: ASP
      ASP有一个最重要的功能,就是它可以让你非常轻松地连接数据库。通常都是和一个Access或者一个SQL数据库相连。因为Access是最容易起步的,同时,在你的机器上也许已经都装有Access了,所以,在下面的例子中,我们都将使用Access来做例子。一旦你学习了ASP和Access数据库连接的核心技术方法,当你开始使用SQL server...
标签: ASP
  方式一:把Java类注册成ActiveX组件 步骤一: 创建一个Java类,命名为Test.java public class Test {       public String getWord()       {           return "Hello World";       } } 步骤二: 编译成c...
标签: Web开发
代码如下: % if SaveFile("/htm/list.htm","http://www.xxx.com/asp/list.asp") then Response.write "已生成" else Response.write "没有生成" end if function SaveFile(LocalFileName,RemoteFileUrl) Dim Ads, Retrieval, GetRemoteData On Error Resume Next Set&...
标签: 电脑入门
首先,下载网友从Vista中分离出的Windows日历 下载后,将其解压到Program FilesWindows Calendar文件夹中,右键单击可执行程序文件名WinCal,选择锁定到任务栏或附到开始菜单即可。 压缩包内文件夹说明: zh-CN--日历组件的简体中文语言包 en-US--英文语言包 Windows日历主界面 Windows日历组件默认使用简体中文界面,如需英文,将zh...
====日历主页面=== <head <titleCalendar Example</title <?IMPORT NAMESPACE="MYCAL" IMPLEMENTATION="calendar.htc"/ </HEAD <BODY <PClick a day in the calendar to add or modify your schedule.</P <MYCAL:CALENDAR</MYCAL:CALENDAR </BODY </HTML ===CALENDAR HTC=== <HEAD <...

经验教程

437

收藏

60
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部