Показаны сообщения с ярлыком browser incompatibilities. Показать все сообщения
Показаны сообщения с ярлыком browser incompatibilities. Показать все сообщения

пятница, 17 июля 2009 г.

Default button type in IE vs Firefox

If you just write <button>, what type will it be: input, reset or submit?










Firefox

IE

Well, the specs (http://www.w3.org/TR/html401/interact/forms.html#h-17.5) are clear on that one, so that's pretty much no surprise. It's submit.

What's less obvious is when you put a button inside a form, pushing it does reload a page, unless you return false from onclick handler.

Here the default value is button. It's sort of convenient for JavaScript apps actually.


Also: