td中内容为特殊字符时,该怎么换行?

qa7412007 2011-01-06 12:23:46
<div style="word-break:break-all; width:100px;">${x[0]}</div> 这是我控制的,${x[0]}是我取的值为:???????????????????????????????????????????????????????????????????????????????????????????
这么的问号,可是页面上是不会换行的,该怎么控制下呢,中文和英文是能控制的。

当值为:换???????????????????????????????????????????????????????????????????????????????????????????行

这个的时候,文字换行了,问号还是没有换行
...全文
389 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
ziseyu5210 2012-08-01
  • 打赏
  • 举报
回复
5楼的方法在ie6下行不通啊
lemontree02o8 2011-01-10
  • 打赏
  • 举报
回复
急聘 兼职网络信息回复员(若干名)100元/天 工资日结
招聘人数: 若干名  薪资待遇: 工作每天3-5小时,100-200元/天工资每日支付;
岗位描述: 负责公司所要求的信息回复工作(有内容样版),工作地点不限,专兼职均

可!
应聘要求: 上网熟练,平均每天工作投入约3小时,具体根据效率自定; 学历不限,在
职或学生皆可;勤奋,认真,有责任感;熟悉用电脑发消息的整个流程。(很简单,学

一下就会!)

(请注意,应聘不用交任何费用,押金等)

详情看公司招聘:http://www.soho-w0rk.info/?3976.htm

邮箱:vip@soho-w0rk.info
DearFen 2011-01-06
  • 打赏
  • 举报
回复
<table>
<tr>
<td style="width:150px;border:1px solid red;word-wrap: break-word;">???????????????????????????????????????????????????????????????????????????????????????????</td>
</tr>
</table>

之前发的有点不对,颜色没显示出来,看这条
DearFen 2011-01-06
  • 打赏
  • 举报
回复

<table>
<tr>
<td style="width:150px;border:1px solid red;word-wrap: break-word;">???????????????????????????????????????????????????????????????????????????????????????????</td>
</tr>
</table>


设定word-wrap 属性,必须要设置标签元素的宽度,否则不换行
爱吃面条 2011-01-06
  • 打赏
  • 举报
回复
style.wordBreak = break-all
String that specifies or receives one of the following values.normal Default. Allows line breaking within words.
break-all Behaves the same as normal for Asian text, yet allows the line to break arbitrarily for non-Asian text. This value is suited to Asian text that contains some excerpts of non-Asian text.
keep-all Does not allow word breaking for Chinese, Japanese, and Korean. Functions the same way as normal for all non-Asian languages. This value is optimized for text that includes small amounts of Chinese, Japanese, or Korean.


如果不行试试下面两个属性,肯定有一个能够搞定的
style.wordWrap
String that specifies or receives one of the following values.normal Default. Content exceeds the boundaries of its container.
break-word Content wraps to next line, and a word-break occurs when necessary.




object.wrap
String that specifies or receives one of the following values.soft Default. Text is displayed with wordwrapping and submitted without carriage returns and line feeds.
hard Text is displayed with wordwrapping and submitted with soft returns and line feeds.
off Wordwrapping is disabled. The lines appear exactly as the user types them.
qa7412007 2011-01-06
  • 打赏
  • 举报
回复
汗,貌似csdn也是这种bug,呵,谁能解决下,
qa7412007 2011-01-06
  • 打赏
  • 举报
回复
很给力,谢了,呵[Quote=引用 4 楼 dearfen 的回复:]
<table>
<tr>
<td style="width:150px;border:1px solid red;word-wrap: break-word;">???????????????????????????????????????????????????????????????????????????????????????????</td>
</tr>
</table>

……
[/Quote]

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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