0

改行で区切られたスクロールする一連のテキスト メッセージを出力しようとしています。

私のコードは次のようになります。

<script type="text/javascript" src="xbMarquee.js"></script>

<script type="text/javascript">
<!--
//set the marquee parameters
function init() { down_marquee.start(); }
var down_marquee_Text = '<em>"This is a test comment. - Love from Admin /n"This is a far longer test comment which is of greater and more powerful value to the research portions of both physical, mental and citrus flavoured sciences all around the world for years to come."-Love PICKLES"</em>';
var down_marquee_Direction = 'down';
var down_marquee_Contents='<span style="white-space:nowrap;">' + down_marquee_Text + '</span>';
up_marquee = new xbMarquee('down_marquee', '100%', '90%', 6, 100, down_marquee_Direction, 'scroll', down_marquee_Contents);
window.setTimeout( init, 200);
-->
</script></div>

改行が表示されるように修正するのを手伝ってくれる人はいますか? タグなど、考えられることはすべて試しました。

ありがとう!

ナイ

4

1 に答える 1

0

<pre>空白を保持する HTML 要素を使用します。それ以外の場合は に置き換え\nます<br>

于 2013-02-11T19:46:23.867 に答える