form中写出来仍然有段落的效果,也就是说仍然能够开头空几格

stillfire 2004-06-23 08:22:33
form中写出来仍然有段落的效果,也就是说仍然能够开头空几格
向这样

大三大赛断送到阿瑟断送到阿三点阿三点阿瑟断送到大三大赛断送到阿瑟断送到阿三点阿三。
abc点阿瑟断送到大三大赛断送到阿瑟断送到阿三点阿三点阿瑟断送到大三大赛断送到阿瑟断送到阿三点阿三点阿瑟断送到大三大赛断送到阿瑟断送到阿三点阿三点阿瑟断送

向上面的,我希望在abc出处另起一段并且空几格
...全文
107 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
ebstar 2004-07-08
  • 打赏
  • 举报
回复
<pre>
测试
</pre>
wanghr100 2004-06-24
  • 打赏
  • 举报
回复
用户填写,提交到数据库后对字符串进行转换.


<%
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
%>

<%
rs("content") = htmlencode2(Request.Form("content"))
%>
liberydn 2004-06-24
  • 打赏
  • 举报
回复
<pre>
大三大赛断送到阿瑟断送到阿三点阿三点阿瑟断送到大三大赛断送到阿瑟断送到阿三点阿三。
abc点阿瑟断送到大三大赛断送到阿瑟断送到阿三点阿三点阿瑟断送到大三大赛断送到阿瑟断送到阿三点阿三点阿瑟断送到大三大赛断送到阿瑟断送到阿三点阿三点阿瑟断送

</pre>
horlian 2004-06-24
  • 打赏
  • 举报
回复
加两个中文空格就可以了
xkou 2004-06-24
  • 打赏
  • 举报
回复
同意 keaizhong(可爱钟) 他不是让你的用户输<p>
而是在输出时用 style="text-indent:22px; 控制缩进
wind0209 2004-06-23
  • 打赏
  • 举报
回复
用户提交以后你把用户提交的内容做些替换
" " ----  
"/r/n" ---- <br>
stillfire 2004-06-23
  • 打赏
  • 举报
回复
to 回复人: gaochen11(gaochen11

什么意思,能不能具体一点!


to 回复人: keaizhong(可爱钟) (
这样可以但是,我得用户并不会这么样的填写表格的
他们不会用<p><br>
keaizhong 2004-06-23
  • 打赏
  • 举报
回复
<p>大三大赛断送到阿瑟断送到阿三点阿三点阿瑟断送到大三大赛断送到阿瑟断送到阿三点阿三。<br><div style="text-indent:22px; ">abc点阿瑟断送到大三大赛断送到阿瑟断送到阿三点阿三点阿瑟断送到大三大赛断送到阿瑟断送到阿三点阿三点阿瑟断送到大三大赛断送到阿瑟断送到阿三点阿三点阿瑟断送
</div>
</p>
gaochen11 2004-06-23
  • 打赏
  • 举报
回复
replace(replace("内容",chr(13),"<br">),chr(32)," ")

61,112

社区成员

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

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