10 个解决方案
#1
http://expert.csdn.net/Expert/topic/2856/2856536.xml?temp=.6483576
#2
http://expert.csdn.net/Expert/topic/3019/3019342.xml?temp=.3481256
#3
比如你存放文章内容的字段为detail,那么你显示的时候这么做:
<%=replace(rs("detail"),chr(13)+chr(10),"<br> ")%>
<%=replace(rs("detail"),chr(13)+chr(10),"<br> ")%>
#4
不行啊,我是分段啊
#5
给你一段代码用
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25"><strong><%=RS("title")%></strong></td>
</tr>
<tr>
<td>
<%
For i=1 to Len(RS("body"))
word=Mid(RS("body"),i,1)
ascword=Asc(word)
If ascword=13 Then 'Åжϵ±Ç°×Ö·ûÊÇ·ñΪÈí»Ø³µ
i=i+1
%>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<%Else%>
<%=word%>
<%
End If
Next
%>
</td>
</tr>
</table>
用这个替换原来的显示部分就行了
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25"><strong><%=RS("title")%></strong></td>
</tr>
<tr>
<td>
<%
For i=1 to Len(RS("body"))
word=Mid(RS("body"),i,1)
ascword=Asc(word)
If ascword=13 Then 'Åжϵ±Ç°×Ö·ûÊÇ·ñΪÈí»Ø³µ
i=i+1
%>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<%Else%>
<%=word%>
<%
End If
Next
%>
</td>
</tr>
</table>
用这个替换原来的显示部分就行了
#6
上面的乱码是注释,删掉好了
#7
比如你存放文章内容的字段为detail,那么你显示的时候这么做:
detail = rs("detail")
detail = "<p align=left>" & detail & "</p>"
detail = replace(detail,chr(13)+chr(10),"</p><p align=left")
<%=detail%>
detail = rs("detail")
detail = "<p align=left>" & detail & "</p>"
detail = replace(detail,chr(13)+chr(10),"</p><p align=left")
<%=detail%>
#8
只要加入style="word-break:Break-all">就可以的
例:
<td style="word-break:Break-all">asdddddddddddddddddddddddddddasdddddddddddddddd
<td>
例:
<td style="word-break:Break-all">asdddddddddddddddddddddddddddasdddddddddddddddd
<td>
#9
rainjue(雨) ( ) 信誉:100 2004-05-12 14:43:00 得分:0
你的那段代码在以下的那一行有错:
ascword=Asc(word)
错误信息是:
Microsoft VBScript 运行时错误 错误 '800a005e'
无效使用 Null
/dfzx/new_page_1.asp,行 173
请指教,谢谢!
你的那段代码在以下的那一行有错:
ascword=Asc(word)
错误信息是:
Microsoft VBScript 运行时错误 错误 '800a005e'
无效使用 Null
/dfzx/new_page_1.asp,行 173
请指教,谢谢!
#10
谢谢各位ggjj对信息的提供,特别是“rainjue(雨) ”您给我提供的源代码真的是太好了,只需要改一点点,以下是我改的,在对大家表示忠心的感谢!!
以下是我改的源代码:
<%
response.write " "
dbrsword=dbrs(6).value
For i=1 to Len(dbrsword)
word=Mid(dbrsword,i,1)
ascword=Asc(word)
If ascword=13 Then
i=i+1
response.write "<br>"
response.write " "
Else
response.write word
End If
Next
%>
以下是我改的源代码:
<%
response.write " "
dbrsword=dbrs(6).value
For i=1 to Len(dbrsword)
word=Mid(dbrsword,i,1)
ascword=Asc(word)
If ascword=13 Then
i=i+1
response.write "<br>"
response.write " "
Else
response.write word
End If
Next
%>
#1
http://expert.csdn.net/Expert/topic/2856/2856536.xml?temp=.6483576
#2
http://expert.csdn.net/Expert/topic/3019/3019342.xml?temp=.3481256
#3
比如你存放文章内容的字段为detail,那么你显示的时候这么做:
<%=replace(rs("detail"),chr(13)+chr(10),"<br> ")%>
<%=replace(rs("detail"),chr(13)+chr(10),"<br> ")%>
#4
不行啊,我是分段啊
#5
给你一段代码用
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25"><strong><%=RS("title")%></strong></td>
</tr>
<tr>
<td>
<%
For i=1 to Len(RS("body"))
word=Mid(RS("body"),i,1)
ascword=Asc(word)
If ascword=13 Then 'Åжϵ±Ç°×Ö·ûÊÇ·ñΪÈí»Ø³µ
i=i+1
%>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<%Else%>
<%=word%>
<%
End If
Next
%>
</td>
</tr>
</table>
用这个替换原来的显示部分就行了
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25"><strong><%=RS("title")%></strong></td>
</tr>
<tr>
<td>
<%
For i=1 to Len(RS("body"))
word=Mid(RS("body"),i,1)
ascword=Asc(word)
If ascword=13 Then 'Åжϵ±Ç°×Ö·ûÊÇ·ñΪÈí»Ø³µ
i=i+1
%>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<%Else%>
<%=word%>
<%
End If
Next
%>
</td>
</tr>
</table>
用这个替换原来的显示部分就行了
#6
上面的乱码是注释,删掉好了
#7
比如你存放文章内容的字段为detail,那么你显示的时候这么做:
detail = rs("detail")
detail = "<p align=left>" & detail & "</p>"
detail = replace(detail,chr(13)+chr(10),"</p><p align=left")
<%=detail%>
detail = rs("detail")
detail = "<p align=left>" & detail & "</p>"
detail = replace(detail,chr(13)+chr(10),"</p><p align=left")
<%=detail%>
#8
只要加入style="word-break:Break-all">就可以的
例:
<td style="word-break:Break-all">asdddddddddddddddddddddddddddasdddddddddddddddd
<td>
例:
<td style="word-break:Break-all">asdddddddddddddddddddddddddddasdddddddddddddddd
<td>
#9
rainjue(雨) ( ) 信誉:100 2004-05-12 14:43:00 得分:0
你的那段代码在以下的那一行有错:
ascword=Asc(word)
错误信息是:
Microsoft VBScript 运行时错误 错误 '800a005e'
无效使用 Null
/dfzx/new_page_1.asp,行 173
请指教,谢谢!
你的那段代码在以下的那一行有错:
ascword=Asc(word)
错误信息是:
Microsoft VBScript 运行时错误 错误 '800a005e'
无效使用 Null
/dfzx/new_page_1.asp,行 173
请指教,谢谢!
#10
谢谢各位ggjj对信息的提供,特别是“rainjue(雨) ”您给我提供的源代码真的是太好了,只需要改一点点,以下是我改的,在对大家表示忠心的感谢!!
以下是我改的源代码:
<%
response.write " "
dbrsword=dbrs(6).value
For i=1 to Len(dbrsword)
word=Mid(dbrsword,i,1)
ascword=Asc(word)
If ascword=13 Then
i=i+1
response.write "<br>"
response.write " "
Else
response.write word
End If
Next
%>
以下是我改的源代码:
<%
response.write " "
dbrsword=dbrs(6).value
For i=1 to Len(dbrsword)
word=Mid(dbrsword,i,1)
ascword=Asc(word)
If ascword=13 Then
i=i+1
response.write "<br>"
response.write " "
Else
response.write word
End If
Next
%>