jS使字符串不换行显示!很急在线等!!!!!!!!!!!!!!!!!!!!!!!!!
我现在有一个字符串,它的内容会换行和空行,就定义这个字符串为vatstr="{'11e2-d725-4dd2f9fc-b2d2-4d2035de35d5':'TR1311...
我现在有一个字符串,它的内容会换行和空行,就定义这个字符串为 vat str = "{'11e2-d725-4dd2f9fc-b2d2-4d2035de35d5':'TR13110508','11e2-d725-4dd2f9fd-b2d2-4d2035de35d5':'jack.zhang','11e2-d725-
4dd2f9fe-b2d2-4d2035de35d5':'PM','11e2-d725-4dd2f9ff-b2d2-4d2035de35d5':'2013-11-05','11e2-d725-4dd2fa00-b2d2-
4d2035de35d5':'Sales','11e2-d725-8668e7cf-b2d2-4d2035de35d5':'Finish','11e3-46b0-44dcb46c-b6ce-a5ee1d7253cf':'Monday-Pro-
Con-All@nbsp;Grades@nbsp;Discussion-Bulkley-Dunton-AllGrades@nbsp;discussion
Tuesday-Bemis-Curwood-Grease-Resistance-Bemis-(Bemis@nbsp;Innovation@nbsp;Center)
@nbsp;Octcillio@nbsp;Berbert@nbsp;VP@nbsp;of@nbsp;R&D.
Wednesday-Action@nbsp;Printing-
American@nbsp;Packaging_to@nbsp;visit@nbsp;my@nbsp;close@nbsp;friends@nbsp;to@nbsp;try@nbsp;to@nbsp;establish@nbsp;our@nbsp
;specialty@nbsp;grades
Thursday-Worzalla--Recycled@nbsp;uncoated-huge@nbsp;tons-Quad-Contract@nbsp;business@nbsp;discussions
Friday-Lauterbach@nbsp;Group-fly@nbsp;back','11e3-46b0-44e89b4d-b6ce-a5ee1d7253cf':'Monday@nbsp;-Appleton-Tuesday-
Osh@nbsp;Kosh-Neenah-Wednesday-Columbus-Fond-du-Lac-Thursday-Stevens@nbsp;Point-Sussex-all@nbsp;Wisc'}";
我怎么通过JS让它不换行呢?
我用document.write(str);输出来之后的内容就是我想要的,不会换行.但是我不是想要输出,而是把他放在一个变量 var str2;里面.
应该怎么做呢??
很急在线等!!!!!!!!!!!!!!!!!!!!!!!!! 展开
4dd2f9fe-b2d2-4d2035de35d5':'PM','11e2-d725-4dd2f9ff-b2d2-4d2035de35d5':'2013-11-05','11e2-d725-4dd2fa00-b2d2-
4d2035de35d5':'Sales','11e2-d725-8668e7cf-b2d2-4d2035de35d5':'Finish','11e3-46b0-44dcb46c-b6ce-a5ee1d7253cf':'Monday-Pro-
Con-All@nbsp;Grades@nbsp;Discussion-Bulkley-Dunton-AllGrades@nbsp;discussion
Tuesday-Bemis-Curwood-Grease-Resistance-Bemis-(Bemis@nbsp;Innovation@nbsp;Center)
@nbsp;Octcillio@nbsp;Berbert@nbsp;VP@nbsp;of@nbsp;R&D.
Wednesday-Action@nbsp;Printing-
American@nbsp;Packaging_to@nbsp;visit@nbsp;my@nbsp;close@nbsp;friends@nbsp;to@nbsp;try@nbsp;to@nbsp;establish@nbsp;our@nbsp
;specialty@nbsp;grades
Thursday-Worzalla--Recycled@nbsp;uncoated-huge@nbsp;tons-Quad-Contract@nbsp;business@nbsp;discussions
Friday-Lauterbach@nbsp;Group-fly@nbsp;back','11e3-46b0-44e89b4d-b6ce-a5ee1d7253cf':'Monday@nbsp;-Appleton-Tuesday-
Osh@nbsp;Kosh-Neenah-Wednesday-Columbus-Fond-du-Lac-Thursday-Stevens@nbsp;Point-Sussex-all@nbsp;Wisc'}";
我怎么通过JS让它不换行呢?
我用document.write(str);输出来之后的内容就是我想要的,不会换行.但是我不是想要输出,而是把他放在一个变量 var str2;里面.
应该怎么做呢??
很急在线等!!!!!!!!!!!!!!!!!!!!!!!!! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询