Prevent Opera browser from enriching HTML5 fields
I'm using loads of inputs with HTML5 types (such as 'date' or 'time') using the jQuery Tools library. Some browsers (like Opera) automatically recognize that and, for开发者_开发百科 example, transform the <input type="time" />
into a time input.
However, I do not want that behavior (since Opera's time input does not include seconds). Is there any common HTML5 way of disabling such special behavior?
Thanks, Remo
If you want a time element on Opera to display seconds, add the attribute step="1"
, you can get milliseconds by setting step="0.1"
and step=60
will give you the default hh:mm
again. This also works in Chrome (tested in 9.0.597.98 beta).
As most of the commenters on the original question already stated: No, there is no "common HTML5 way" to prevent this behavior.
Even if so, you shouldn't. You're effectivly asking Opera to ignore something you asked for in the first place: a special UI.
精彩评论