简单的段落分割

发布于 2024-10-07 08:36:50 字数 107 浏览 2 评论 0原文

我试图在我的文本文件(name.js)中进行一个简单的段落分隔符,以便当iphone提取信息(name.js)时,段落中不会出现大的运行。我看了又看,找不到此信息,你能帮我吗?项目此时到期......

I am trying to make a simple paragraph break in my text file (name.js) so that when the iphone pulls the information (name.js) there is not one big run on paragraph. I have looked and looked and cannot find this information can you help me project is due at this time...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

执笏见 2024-10-14 08:36:50

在 javascript 中尝试这样的事情:

var pageBreak = document.createElement("/p");
document.getElementsByTagName("tagToInsertBreakAfter")[0].appendChild(pageBreak);

try something like this in the javascript:

var pageBreak = document.createElement("/p");
document.getElementsByTagName("tagToInsertBreakAfter")[0].appendChild(pageBreak);
注定孤独终老 2024-10-14 08:36:50

我远离我的机器,所以我无法检查,但尝试 \n 或 \r\n

好吧,它必须是其中之一,

<br />

我刚刚破解了一个小部件并尝试了它。顺便说一句,我假设您正在执行类似以下操作

// localised strings
  var backString_01 = "World Second <br />offers unbeatable exchange rates and exceptional service for foreign exchange and international payments";

,然后使用 html 中的元素输出到文档,

document.getElementById('services_headline').innerHTML = backString_01;

例如......

<div id="services_headline" apple-part="com.apple.Dashcode.part.text" class="apple-text apple-no-children" apple-default-image-visibility="hidden" apple-text-overflow="ellipsis"></div>

I am away from my machine so i cannot check but try a \n or \r\n

Well it had to be one or the other it'

<br />

i just hacked a widget and tried it. By the way i am assuming you are doing some like the following

// localised strings
  var backString_01 = "World Second <br />offers unbeatable exchange rates and exceptional service for foreign exchange and international payments";

then outputting to the document with

document.getElementById('services_headline').innerHTML = backString_01;

With the element in the html something like ....

<div id="services_headline" apple-part="com.apple.Dashcode.part.text" class="apple-text apple-no-children" apple-default-image-visibility="hidden" apple-text-overflow="ellipsis"></div>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文