HTML textarea autofocus attribute
Examples
An auto-focused text area:
<textarea autofocus>
在 w3big.com 你将学会如何制作网站。我们提供了最全的web技术教程。
</textarea>
在 w3big.com 你将学会如何制作网站。我们提供了最全的web技术教程。
</textarea>
try it"
Browser Support
Internet Explorer 10, Firefox, Opera, Chrome and Safari support autofocus attribute.
Note: autofocus attribute versions of Internet Explorer support <textarea> 9 and before the tag.
Definition and Usage
autofocus attribute is a Boolean attribute.
autofocus attribute specifies the text area should automatically get focus when the page loads.
Differences between HTML 4.01 and HTML5
autofocus attributes are new attributes in HTML5 <textarea> tag.
Differences between HTML and XHTML
In XHTML, prohibit attribute minimization, autofocus attribute must be defined as <textarea autofocus = "autofocus">.
grammar
<textarea autofocus>
HTML <textarea> tag