请问各位朋友,用asp提交的文章怎么能分段显示,我的文章不管多大总是一段,韵闷!!!

loser2001 2003-07-14 09:55:51
请问各位朋友,用asp提交的文章怎么能分段显示,我的文章不管多大总是一段,韵闷!!!
...全文
31 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
webdj 2003-07-14
  • 打赏
  • 举报
回复
你是不是没把换行转换成chr(10)&char(13)???
wanghr100 2003-07-14
  • 打赏
  • 举报
回复
你提交后是没有格式了..
给你个函数,对Textarea的内容进行转化..

<%
function htmlencode2(str)
dim result
dim l
if isNULL(str) then
htmlencode2=""
exit function
end if
l=len(str)
result=""
dim i
for i = 1 to l
select case mid(str,i,1)
case "<"
result=result+"<"
case ">"
result=result+">"
case chr(13)
result=result+"<br>"
case chr(34)
result=result+"""
case "&"
result=result+"&"
case chr(32)
'result=result+" "
if i+1<=l and i-1>0 then
if mid(str,i+1,1)=chr(32) or mid(str,i+1,1)=chr(9) or mid(str,i-1,1)=chr(32) or mid(str,i-1,1)=chr(9) then
result=result+" "
else
result=result+" "
end if
else
result=result+" "
end if
case chr(9)
result=result+" "
case else
result=result+mid(str,i,1)
end select
next
htmlencode2=result
end function
%>
flyycyu 2003-07-14
  • 打赏
  • 举报
回复
恩!
那是因为你是用TEXTAREA
找一个HTML的编辑器吧

61,115

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧