开发者

is the accept attribute compatible with all browsers?

Do all browsers su开发者_JAVA百科pport the accept attribute on form elements?


They all accept it (assuming you mean accept-charset attribute) but they don't all do the same thing with it.

HTML forms may define the attribute accept-charset, which tells the browser which encoding to use when sending data to the server. The funny thing is, that it breaks horribly and is not handled properly by any browser.

Further Reading (and browser handling).

If you do use it, make sure it is the same as the charset you are delivering the document in. For example, if you have your document as UTF-8, your accept-charset attribute should be UTF-8.

Our lovely friend IE ignores the attribute altogether, though I'm not sure if that has been fixed in the least worse versions, e.g. IE9.


In HTML, the input element, there is an accept attribute. It does work in all browsers.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜