html如何让英文自动换行,HTML如何让英文自动换行不断词

网上有很多“CSS控制连续英文字母强制换行/用css让英文文本自动换行”之类的文章,但是没有一个可以解决我碰到的问题。

英文文字如下:

Shanghai Golden Ferry International Trade Co., Ltd. is located

in Pudong New District of Shanghai, China. What we do now are

concerning about living and life. Our Philosophy is to create

better living conditions and enhance life qualities for our

。。。

Shanghai & welcome to our company and

factories!

用网上的方法出现:

Shanghai Golden Ferry International Trade Co., Ltd. is located

in Pudon

g New District of Shanghai, China. What we do now are concerning

abou

t living and life. Our Philosophy is to create better living

conditions and e

nhance life qualities for our

。。。

Shanghai & welcome to our company and

factories!

英文单词被无情的劈开,那然后解决呢?

下面我提供我的解决方法:

首先写在该页面的顶部加入下面的代码:

function HTMLDecode(fString)

fString = Replace(fString," ",chr(32))

HTMLDecode = fString

end function

%>

然后在英文输出的地方加上:

这样就可以解决英文换行不分裂单词了

这是用后的效果:

Shanghai Golden Ferry International Trade Co., Ltd. is located

in Pudong

New District of Shanghai, China. What we do now are concerning

about

living and life. Our Philosophy is to create better living

conditions and

enhance life qualities for our 。。。

Shanghai & welcome to our company

and factories!

为什么这样就可以解决?

后来看代码才发现Shanghai Golden Ferry International Trade Co

在数据库里是这样的Shanghai Golden Ferry International Trade

Co

空格全是 所以系统把文章看一个很长的单词了,于是就割断单词了,我吧 这个换成空格后问题解决

那为什么会出现这样的情况呢?

我出现的情况,从网上复制的文章,然后点了文本,后在提交就出这问题了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值