HTMLコードのすべてのタグを削除します
コードコピーは次のとおりです。
<%
'*******************************
'関数:removehtml_a(strtext)
'引数:strtext、処理される文字列
著者:アリクシ
'日付:2007/7/12
'説明:HTMLコードのすべてのタグを削除します
'例:<%= removehtml_a( "<b> Alixixiへようこそ</b>")%>
'*******************************
functionRemovehtml_a(strtext)
dimnpos1
dimnpos2
npos1 = strtext、 "<")
Dowhilenpos1> 0
npos2 = strust(npos1+1、strtext、 ">")
ifnpos2> 0then
strtext = left(strtext、npos1-1)&mid(strtext、npos2+1)
それ以外
出口
endif
npos1 = strtext、 "<")
ループ
removehtml_a = strtext
エンド機能
%>
HTMLコードのすべてのタグを削除します
コードコピーは次のとおりです。
<%
'*******************************
'関数:removehtml_b(strtext)
'引数:strtext、処理される文字列
著者:アリクシ
'日付:2007/7/12
'説明:HTMLコードのすべてのタグを削除します
'例:<%= removehtml_b( "<b> Alixixiへようこそ</b>")%>
'*******************************
functionRemovehtml_b(strtext)
Dimregex
setRegex = newRegexp
regex.pattern = "<[^>]*>"
regex.global = true
removehtml_b = regex.replace(strtext、 "")
エンド機能
%>
HTMLコードのすべてのタグを削除します
コードコピーは次のとおりです。
<%
'*******************************
'関数:removehtml_c(strtext)
'引数:strtext、処理される文字列
著者:アリクシ
'日付:2007/7/12
'説明:HTMLコードのすべてのタグを削除します
'例:<%= removehtml_c( "<b> Alixixiへようこそ</b>")%>
'*******************************
functionRemovehtml_c(strtext)
dimtaglist
タグリスト= ";! - ;!doctype; a; incronymy; address; applet; area; b; base; basefont;"&_
「bgsound; big; blockquote; body; br; button; capture; center; cite; code; "&_