Line breaks won't display in textarea in IE

前端 未结 3 1454
庸人自扰
庸人自扰 2021-01-05 16:42

Using jQuery\'s .load() method I\'m loading text into a textarea. Works fine in Chrome & FF. As always, IE just has to be different and won\'t display the l

3条回答
  •  攒了一身酷
    2021-01-05 17:17

    They're compatibility problems with IE when using innerHTML(). As Jquery's .html() and .load() methods both use innerHTML(), they by extension can result in some issues. One solution is to use .text() instead. If you want to load text into a