怎么让按输入的格式输出

iwish100000 2004-05-03 09:45:29
在文本框中输入文字 存入数据库 怎么让它输出的格式与原来一样
就是说 换行 空格什么的
...全文
120 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
iwish100000 2004-05-03
  • 打赏
  • 举报
回复
可以呀 谢谢
ayukowa 2004-05-03
  • 打赏
  • 举报
回复
<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>
function DoWhiteSpace(str)
DoWhiteSpace = Replace((Replace(str, vbCrlf, "<br>")), chr(32)&chr(32), "  ")
End Function
</SCRIPT>
<table width="80%" border="0" align="center" bgcolor="#CCCCCC" class="font1">
<tr bgcolor="#FFFFFF">
<td colspan="6"><div align="center">
<p><strong><font size="4" face="宋体">中国铝业山东分公司 山东铝业股份有限公司 <br>
请示报告处理情况</font></strong></p>
</div></td>
</tr>
//////////////////////////
<tr bgcolor="#FFFFFF">
<td width="15%" nowrap><strong>领导批示</strong></td>
<td colspan="5"><%=DoWhiteSpace(rs("ldps")) %></td>/////////////////主要就是这个函数调用
</tr>
787912 2004-05-03
  • 打赏
  • 举报
回复
function htmlencode2(str)
if isNULL(str) then
htmlencode2=""
exit function
end if

dim result
result=str

result=replace (result,"<","<")
result=replace (result,">",">")
result=replace(result,chr(13),"<br>")
result=replace (result,"&","&")
result=replace(result," ",chr(9))
result=replace (result,chr(9)," ")

htmlencode2=result
end function

用这个函数试试
iwish100000 2004-05-03
  • 打赏
  • 举报
回复
up

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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