newsconvert.asp

来自「人民医院眼科全站」· ASP 代码 · 共 27 行

ASP
27
字号
<%
function newsConvert(str)
dim tempstr
dim theStr
dim canConvert
dim theChr
tempStr=str
theChr=""
theStr=""
canConvert=1
for i=1 to len(tempStr)
	theChr=mid(tempStr,i,1)
	if theChr="<" then
		canConvert=0
	end if
	if theChr=">" then
		canConvert=1
	end if
	if theChr=" " and canConvert=1 then
		theChr= "&nbsp;"
	end if
	theStr=theStr&theChr
next
    theStr=replace(theStr,chr(13),"<br>")
	newsConvert=theStr
End function
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?