亚洲最大看欧美片,亚洲图揄拍自拍另类图片,欧美精品v国产精品v呦,日本在线精品视频免费

  • 站長資訊網(wǎng)
    最全最豐富的資訊網(wǎng)站

    html焦點是什么意思

    在html中,焦點是光標的意思,元素通過鼠標點擊就可以獲得光標,也即獲得焦點;可以利用autofocus屬性來規(guī)定當頁面加載時元素會自動獲得焦點,該屬性是一個布爾屬性,若指定元素設(shè)置該屬性則會獲得焦點,語法為“<指定元素 autofocus="autofocus">”。

    html焦點是什么意思

    本教程操作環(huán)境:windows10系統(tǒng)、HTML5版本、Dell G3電腦。

    html焦點是什么意思

    焦點在HTML和JS中是指光標。

    焦點在JS和HTML里是在頁面上屏幕中閃動的小豎線,鼠標點擊就可獲得光標,Tab鍵可按照設(shè)置的Tabindex來進行切換焦點。

    autofocus 屬性規(guī)定當頁面加載時 input 元素應該自動獲得焦點。

    如果使用該屬性,則 input 元素會獲得焦點。

    autofocus 屬性是 HTML5 中的新屬性。

    autofocus 屬性是一個布爾屬性。

    autofocus 屬性規(guī)定當頁面加載時 <input> 元素應該自動獲得焦點。

    語法如下:

    <input autofocus>

    或者

    <input autofocus="autofocus">

    示例如下:

    <form action="demo_form.asp">   First name: <input type="text" name="fname" autofocus><br>   Last name: <input type="text" name="lname"><br>   <input type="submit"> </form>

    輸出結(jié)果:

    html焦點是什么意思

    一旦刷新頁面就會獲得焦點

    (學習視頻分享:css視頻教程、html視頻教程)

    贊(0)
    分享到: 更多 (0)
    網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號