資源描述:
《在asp中使用fso組件生成html頁(yè)面--》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫(kù)。
1、在ASP中使用FSO組件生成HTML頁(yè)面>>共有兩個(gè)頁(yè)面index.htm是首頁(yè).程序比較簡(jiǎn)單,主要是用了ASP里的文件操作對(duì)象。<!--index.htm-------------------------------------------------------------------------------><!DOCTYPEHTMLPUBLIC"-//L4.01Transitional//EN"".l4/loose.dtd"><html><head><title>
2、;UntitledDocument</title><metahttp-equiv="Content-Type"content="text/html;charset=gb2312"></head><body><tablename="form1"method="post"action="send.asp"><tablee="msg"cols="100"roit"name="Submit"value="Submit"><inputtype="reset"na
3、me="Submit2"value="Reset"></div></td></tr></table></form></td></tr></table></body></html>’//send.asp<%functionchan_time(shijian)’轉(zhuǎn)換日期時(shí)間函數(shù)s_year=year(shijian)iflen(s_year)=2thens_year="20"s_years_month=
4、month(shijian)ifs_month<10thens_month="0"s_months_day=day(shijian)ifs_day<10thens_day="0"s_days_hour=hour(shijian)ifs_hour<10th123下一頁(yè)>>>>這篇文章來(lái)自..,。ens_hour="0"s_hours_minute=minute(shijian)ifs_minute<10thens_minute="0"s_minutechan_time=s_years_months_days
5、_hours_minuteendfunctionfunctionchan_data(shijian)’轉(zhuǎn)換日期時(shí)間函數(shù)s_year=year(shijian)iflen(s_year)=2thens_year="20"s_years_month=month(shijian)ifs_month<10thens_month="0"s_months_day=day(shijian)ifs_day<10thens_day="0"s_daychan_data=s_years_months_dayendfunctionfunct
6、ionchan_file(shijian)’轉(zhuǎn)換日期時(shí)間函數(shù)s_month=month(shijian)ifs_month<10thens_month="0"s_months_day=day(shijian)ifs_day<10thens_day="0"s_days_hour=hour(shijian)ifs_hour<10thens_hour="0"s_hours_minute=minute(shijian)ifs_minute<10thens_minute="0"s_minutes_ss=second
7、(shijian)ifs_ss<10thens_ss="0"s_sschan_file=s_months_days_hours_minutes_ssendfunctiontop="<html><head><title>ne="</body></html>"msg=request.Form("msg")msg=replace(msg,vbcrlf,"")msg=replace(msg,chr(9),"")msg=replace(msg,"","nbsp;")msg=
8、replace(msg,"r","<br>")msg=replace(msg,"","<br>")msg=topmsgbotomSetfs=Server.CreateObject("Scripting.FileSystemObj