From d2c717611f2ab3dc0a25deae3a78cf44aa31a4f2 Mon Sep 17 00:00:00 2001 From: YujiSoftware Date: Sun, 16 May 2021 22:30:00 +0900 Subject: Migrate CompatibilityTable to Compat macro (lang-ru) (#876) * Migrate to Compat macro * Migrate to Compat macro (multiple in page) * Migrate to Compat macro * Migrate to Compat macro (removed) --- files/ru/web/html/element/button/index.html | 247 +++++++--------------------- 1 file changed, 55 insertions(+), 192 deletions(-) (limited to 'files/ru/web/html/element/button/index.html') diff --git a/files/ru/web/html/element/button/index.html b/files/ru/web/html/element/button/index.html index 61b3f30109..d79a4a5fb3 100644 --- a/files/ru/web/html/element/button/index.html +++ b/files/ru/web/html/element/button/index.html @@ -127,238 +127,101 @@ original_slug: Web/HTML/Element/кнопка

{{ EmbedLiveSample('Example', 200, 64) }}

-

Спецификации

- +

Clicking and focus

+ +

Whether clicking on a {{HTMLElement("button")}} causes it to (by default) become focused varies by browser and OS. The results for {{HTMLElement("input")}} of type="button" and type="submit" are the same.

+ +
+ - - - + + + - - - + + + - - - - - - - - - - -
Does clicking on a {{HTMLElement("button")}} give it focus?
SpecificationStatusCommentDesktop BrowsersWindows 8.1OS X 10.X
{{SpecName('HTML WHATWG', 'the-button-element.html#the-button-element', '<button>')}}{{Spec2('HTML WHATWG')}}FirefoxYes - Firefox 30.0No (even with a tabindex) Firefox 63
{{SpecName('HTML5 W3C', 'forms.html#the-button-element', '<button>')}}{{Spec2('HTML5 W3C')}}
{{SpecName('HTML4.01', 'interact/forms.html#h-17.5', '<button>')}}{{Spec2('HTML4.01')}}
- -

Browser compatibility

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Feature ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support1.0{{CompatGeckoDesktop("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}Yes - Chrome 35Yes - Chrome 65
formaction attribute9.0{{CompatGeckoDesktop("2.0")}}10{{CompatUnknown}}{{CompatUnknown}}
formenctype attribute9.0{{CompatGeckoDesktop("2.0")}}1010.6{{CompatUnknown}}
formmethod attribute9.0{{CompatGeckoDesktop("2.0")}}10{{CompatUnknown}}{{CompatUnknown}}
autofocus attribute5.0{{CompatGeckoDesktop("2.0")}}109.65.0
menu value for type attribute{{CompatNo}}{{CompatNo}}[1]{{CompatNo}}{{CompatNo}}{{CompatUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - + + + - - - - - - + + +
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}}{{CompatGeckoMobile("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
formaction attribute{{CompatUnknown}}{{CompatGeckoMobile("2.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
formenctype attribute{{CompatUnknown}}{{CompatGeckoMobile("2.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}SafariN/ANo (even with a tabindex) Safari 12 (bug 22261)
formmethod attribute{{CompatUnknown}}{{CompatGeckoMobile("2.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}Internet ExplorerYes - Internet Explorer 11N/A
menu value for type attribute{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}PrestoYes - Opera 12Yes - Opera 12
-
- -

[1] Gecko does not implement this feature yet. See {{bug("1241353")}}.

- -

Clicking and focus

- -

Whether clicking on a {{HTMLElement("button")}} causes it to (by default) become focused varies by browser and OS. The results for {{HTMLElement("input")}} of type="button" and type="submit" were the same.

- - + + - - - + + + + + - - - + + + - - - - - - - - - - - - - - - - - + +
Does clicking on a {{HTMLElement("button")}} give it the focus?Does tapping on a {{HTMLElement("button")}} give it focus?
Desktop BrowsersWindows 8.1OS X 10.9Mobile BrowsersiOS 7.1.2Android 4.4.4
Firefox 30.0YesNo (even with a tabindex)Safari MobileNo (even with a tabindex)N/A
Chrome 35YesYes
Safari 7.0.5N/ANo (even with a tabindex)
Internet Explorer 11YesN/A
Presto (Opera 12)YesYesNo (even with a tabindex)Yes
- - - +

Спецификации

+ +
Does tapping on a {{HTMLElement("button")}} give it the focus?
+ - - - + + + + + - - - + + + - - - + + + + + +
Mobile BrowsersiOS 7.1.2Android 4.4.4SpecificationStatusComment
Safari MobileNo (even with a tabindex)N/A{{SpecName('HTML WHATWG', 'the-button-element.html#the-button-element', '<button>')}}{{Spec2('HTML WHATWG')}}
Chrome 35No (even with a tabindex)Yes{{SpecName('HTML5 W3C', 'forms.html#the-button-element', '<button>')}}{{Spec2('HTML5 W3C')}}
{{SpecName('HTML4.01', 'interact/forms.html#h-17.5', '<button>')}}{{Spec2('HTML4.01')}}
-

Notes

- -

<button> elements are much easier to style than {{HTMLElement("input")}} elements. You can add inner HTML content (think <em>, <strong> or even <img>), and make use of {{Cssxref(":after")}} and {{Cssxref(":before")}} pseudo-element to achieve complex rendering while {{HTMLElement("input")}} only accepts a text value attribute.

- -

IE7 has a bug where when submitting a form with <button type="submit" name="myButton" value="foo">Click me</button>, the POST data sent will result in myButton=Click me instead of myButton=foo.
- IE6 has an even worse bug where submitting a form through a button will submit ALL buttons of the form, with the same bug as IE7.
- This bug has been fixed in IE8.

- -

Firefox will add, for accessibility purposes, a small dotted border on a focused button. This border is declared through CSS, in the browser stylesheet, but you can override it if necessary to add your own focused style using button{{cssxref("::-moz-focus-inner")}} { }

- -

Firefox will, unlike other browsers, by default, persist the dynamic disabled state of a {{HTMLElement("button")}} across page loads. Setting the value of the {{htmlattrxref("autocomplete","button")}} attribute to off disables this feature. See {{bug(654072)}}.

- -

Firefox <35 for Android sets a default {{ cssxref("background-image") }} gradient on all buttons (see {{bug(763671)}}). This can be disabled using background-image: none.

- -

See also

- -

Other elements that are used for creating forms: {{HTMLElement("form")}}, {{HTMLElement("datalist")}}, {{HTMLElement("fieldset")}}, {{HTMLElement("input")}},{{HTMLElement("keygen")}}, {{HTMLElement("label")}}, {{HTMLElement("legend")}}, {{HTMLElement("meter")}}, {{HTMLElement("optgroup")}}, {{HTMLElement("option")}}, {{HTMLElement("output")}}, {{HTMLElement("progress")}}, {{HTMLElement("select")}}, {{HTMLElement("textarea")}}.

+

Browser compatibility

-
{{HTMLRef}}
+

{{Compat("html.elements.button")}}

-- cgit v1.2.3-54-g00ecf