最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

如何用ASP輸出HTML文件?

 更新時(shí)間:2006年11月16日 00:00:00   作者:  

<!--#include file="top.inc"-->
<%
u_title=request.form("u_title")

' 檢查標(biāo)題是否被輸入.
if u_title = "" then
%>
<form method="POST" action="<%= request.servervariables("script_name") %>">
 <!--
當(dāng)沒(méi)有標(biāo)題輸入時(shí)顯示輸入框-->

  <p>
文件標(biāo)題<br>
  <input type="text" name="u_title" size="35"></p>
  <p>Font Size<br>
  <select size="1" name="u_text_size">
  <option selected value="1">1</option>
  <option value="2">2</option>
  <option value="3">3</option>
  <option value="4">4</option>
  <option value="5">5</option>
  <option value="6">6</option>
  &nbsp;
  </select></p>
  <p>
1<br>
  <textarea rows="2" name="u_paragraph1" cols="35"></textarea></p>
  <p>
2<br>
  <textarea rows="2" name="u_paragraph2" cols="35"></textarea><input type="submit" value="
提交" ></p>
</form>
<%
end if
%>

<%
if u_title <> "" then
    u_title=request.form("u_title")
    u_paragraph1=request.form("u_paragraph1")
    u_paragraph2=request.form("u_paragraph2")
    u_text_color=request.form("u_text_color")
    u_text_size=request.form("u_text_size")
    g_filename=replace(u_title," ","_")

' 如果有一個(gè)用戶(hù)輸入了標(biāo)題,則獲取所有的用戶(hù)輸入的內(nèi)容.

set fso = createobject("scripting.filesystemobject")
Set act = fso.CreateTextFile(server.mappath("write2htm/"&g_filename & "-"& month(date())& day(date())& year(date()) &".htm"), true)
創(chuàng)建create the text (html) file文件到服務(wù)器,并添加mmddyyyy 格式年月日.

寫(xiě)所有用戶(hù)輸入的text (html) 文件, .htm 擴(kuò)展名文件可以很容易地轉(zhuǎn)換成你網(wǎng)站最需要的.asp .inc文件.
    act.WriteLine "<html>"
    act.WriteLine chr(13)
    act.WriteLine "<title>"& u_title &"</title>"
    act.WriteLine chr(13)
    act.WriteLine "<body bgcolor='#FFFFFF'>"
    act.WriteLine chr(13)
    act.WriteLine "<p align='center'><font face='arial' size='"& u_text_size &"'>"
    act.WriteLine chr(13)
    act.WriteLine  u_title &"</p>"
    act.WriteLine chr(13)
    act.WriteLine "<p align='left'><font face='arial' size='"&u_text_size&"'>"
    act.WriteLine chr(13)
    act.WriteLine  u_paragraph1 &"</p>"
    act.WriteLine chr(13)
    act.WriteLine "<p align='left'><font face='arial' size='"& u_text_size &"'>"
    act.WriteLine chr(13)
    act.WriteLine u_paragraph2 &"</p>"
    act.WriteLine chr(13)
    act.WriteLine "<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>"
    act.WriteLine "<p align='center'><font face='arial' size='"& u_text_size &"'>"
    act.WriteLine "
此文件被創(chuàng)建!"
    act.WriteLine  now() &"</p>"
act.Close

' 關(guān)閉文件.
%>
您的頁(yè)面已成功創(chuàng)建!請(qǐng)點(diǎn)擊查看.
<a href="write2htm/<%= g_filename &"-"& month(date())& day(date())& year(date())  %>.htm"
target="_blank">
查看</a>
<br>
<br>
<% response.write "<html>"
    response.write chr(13)
    response.write "<title>"& u_title &"</title>"
    response.write chr(13)
    response.write "<body bgcolor='#FFFFFF'>"
    response.write chr(13)
    response.write "<p align='center'><font face='arial' size='"& u_text_size &"'>"
    response.write chr(13)
    response.write  u_title &"</p>"
    response.write chr(13)
    response.write "<p align='left'><font face='arial' size='"&u_text_size&"'>"
    response.write chr(13)
    response.write  u_paragraph1 &"</p>"
    response.write chr(13)
    response.write "<p align='left'><font face='arial' size='"& u_text_size &"'>"
    response.write chr(13)
    response.write u_paragraph2 &"</p>"
    response.write chr(13)
    response.write "<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>"
    response.write "<p align='center'><font face='arial' size='"& u_text_size &"'>"
    response.write "
此文件被創(chuàng)建!"
    response.write  now() &"</p>"
end if
%>
<!--#include file="bottom.inc"-->

 

相關(guān)文章

最新評(píng)論

岳池县| 壤塘县| 美姑县| 永年县| 绥德县| 湘阴县| 乾安县| 达尔| 武隆县| 随州市| 辽阳市| 武冈市| 定州市| 吉安市| 个旧市| 平山县| 固始县| 富民县| 高雄市| 卓资县| 大丰市| 崇义县| 翁源县| 荔波县| 沧州市| 金堂县| 桐城市| 宝山区| 六安市| 姜堰市| 长宁区| 双辽市| 垣曲县| 本溪市| 广宗县| 米脂县| 阿城市| 乌鲁木齐市| 靖西县| 临沂市| 阿拉善右旗|