开发者

HTML: Why doesn't Firefox use wrap="off" when set by JavaScript?

I'm using this:

$('document').ready(function(){
    $('textarea').attr('wrap', 'off');
});

(JQuery) (Firefox 3.5)

I'm checking with WebDeveloper that the wrap attribute indeed is set to off in the page when开发者_如何学C I'm loading it up, but the text still wraps. If I hard-code the invalid HTML of wrap="off" into the <textarea> in my HTML, it works fine, but this is invalid HTML and I'm not interested in doing that. When using spellcheck="false" in JavaScript you actually have to pass it the keyword false instead of a string "false". I tried to apply this same principle using false instead of "off", but it didn't work.


This seems to be a phenomenon happening with Firefox and Opera. See this question

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜