【发布时间】:2011-10-20 23:09:47
【问题描述】:
FF 和 Chrome 表现良好,但 IE (8) 没有在我放入 TEXTAREA 的格式化代码中保留空白
<textarea id="vdt_table_textarea" style="white-space: pre"></textarea>
和
var vdt_demo_table_string = '<table id="example" class="display">\n\
<thead>\n\
<tr>\n\
<th>Rendering engine</th>\n\
<th>Browser</th>\n\
<th>Platform(s)</th>\n\
<th>Engine version</th>\n\
<th>CSS grade</th>\n\
</tr>\n\
</thead>\n\
etc....
';
$(document).ready(function() {
$('#vdt_table_textarea').html(vdt_demo_table_string.replace(' ', ' '));
});
如何让 IE 尊重我的权威?!
【问题讨论】:
标签: html internet-explorer textarea whitespace