Keygen autofocus attribute
Examples
See keygen field whether to automatically get the focus when the page loads:
var x = document.getElementById("myKeygen").autofocus;
x The output is:
true
try it"
Definitions and use
autofocus property sets or returns keygen field whether to automatically get focus when the page loads.
This attribute is HTML autofocus property.
Browser Support
All major browsers support the autofocus attribute, in addition to Internet Explorer.
Note: <keygen> element in HTML autofocus attribute does not support Firefox.
grammar
Back autofocus properties:
keygenObject .autofocus
Setting autofocus properties:
keygenObject .autofocus=true|false
Property Value
值 | 描述 |
---|---|
true|false |
描述了 keygen 字段在页面加载时是否获取焦点。
|
Technical Description
return value: | Boolean value that, if the keygen field automatically get the focus when the page loads return tru, false otherwise |
---|
Related Pages
HTML Reference Manual: HTML <keygen> The autofocus attribute