【发布时间】:2010-07-27 08:42:53
【问题描述】:
我正在开发一个应用程序,在检索 div 的内部 HTML 时,我在 Internet Explorer 上遇到了一个问题。
我有以下检索输入:
<div> This is first segment</div>
我使用 jquery 脚本来提取内容。 即
$('div').html();
使用上述语句后的输出:
This is first segment
此处未检索 div 中存在的前导空格。
我期待的是:
This is first segment
我在 Internet Explorer 上遇到了这个问题,它在 FireFox 上工作正常。
请提出您对此的看法。
提前致谢
【问题讨论】:
标签: javascript jquery