0

This:

$('#myDiv').val( $('#myDiv').val() + "\n")

is not adding a newline in IE. Is there a say to overcome this problem without actually appending <br> instead of \n? I'm doing parsing later in the code and that is why I can't use <br> instead of \n.

4

2 に答える 2

0

を使用していることに気付きましたval()text()の代わりに使用しval()ます。

于 2012-08-07T12:22:02.303 に答える
0

表示したい場合は、2 つの新しい行を追加する必要があります。代わりにandを
使用してください。html<br>

空行は、その後に別の行がある場合、またはテキストが含まれている場合にのみ表示されます。

于 2012-08-07T12:15:39.840 に答える