濮阳杆衣贸易有限公司

主頁 > 知識庫 > 一些簡單的ASP練習

一些簡單的ASP練習

熱門標簽:沈陽三五防封電銷卡 廣東語音外呼系統(tǒng)公司 鄢陵學校如何做地圖標注 成都ai外呼系統(tǒng)線路 云南便宜外呼系統(tǒng)平臺 鄭州智能外呼電銷機器人廠家 沈陽電話機器人公司 長春公司外呼系統(tǒng)中心 虛擬電話外呼系統(tǒng)
1,練習使用request對象接受數(shù)據(jù),并且綜合運用些函數(shù)。

cnbruce.html

form action="cnbruce.asp" method="post">
input type="text" name="title">br>
textarea name="content" rows=10 cols=20>/textarea>br>
input type="submit">
/form>


cnbruce.asp

%
function th(str)
str=replace(str,"媽的","MD")
str=replace(str,"靠","KAO")
th=str
end function

function encode(str)
str = replace(str, ">", "gt;")
str = replace(str, "", "lt;")
str = Replace(str, CHR(32), "nbsp;")
str = Replace(str, CHR(13), "")
str = Replace(str, CHR(10) CHR(10), "/P>P>")
str = Replace(str, CHR(10), "BR>")
encode=str
end function
%>

%title=request.form("title")
content=request.form("content")%>

文章標題:%=th(title)%>hr>
文章內(nèi)容:%=encode(th(content))%>


th(str)為自定義函數(shù),主要功能很簡單:過濾字符。encode(str)也為自定義函數(shù),主要功能是完整地顯示被傳遞的信息。
CHR(10)表示換行,CHR(13)表示回車,CHR(32)表示空格。

附加功能:顯示UBB代碼。
即ubb.asp中含有ubb()函數(shù)。

增強的cnbruce.asp

!--#include file="http://www.cnbruce.com/blog/ubb.asp"-->
%
function th(str)
str=replace(str,"媽的","MD")
str=replace(str,"靠","KAO")
th=str
end function
%>

script>
function runEx(cod1) {
cod=document.all(cod1)
var code=cod.value;
if (code!=""){
var newwin=window.open('','','');
newwin.opener = null
newwin.document.write(code);
newwin.document.close();
}
}
/script>

%title=request.form("title")
content=request.form("content")%>

文章標題:%=th(title)%>hr>
文章內(nèi)容:%=ubb(unhtml(th(content)))%>


標簽:湖北 四平 朝陽 孝感 平頂山 防城港 馬鞍山 遼陽

巨人網(wǎng)絡(luò)通訊聲明:本文標題《一些簡單的ASP練習》,本文關(guān)鍵詞  一些,簡單,的,ASP,練習,一些,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《一些簡單的ASP練習》相關(guān)的同類信息!
  • 本頁收集關(guān)于一些簡單的ASP練習的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    鹤峰县| 柳江县| 建昌县| 小金县| 大英县| 岳池县| 孝义市| 隆尧县| 威远县| 会昌县| 措美县| 佛山市| 广安市| 赞皇县| 吉安市| 海口市| 奇台县| 英超| 永清县| 五常市| 灵寿县| 黑龙江省| 宁化县| 新安县| 广安市| 定南县| 凉城县| 教育| 会东县| 红安县| 潞西市| 罗定市| 吴江市| 奉化市| 雅江县| 孙吴县| 政和县| 商城县| 扎囊县| 中卫市| 开鲁县|