久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      html中focus的用法是什么

      在html中,focus是“焦點(diǎn)”的意思,focus()方法用于為元素設(shè)置焦點(diǎn),語法為“HTMLElementObject.focus()”;元素通過focus()方法設(shè)置的焦點(diǎn),可以通過blur()方法進(jìn)行移除。

      html中focus的用法是什么

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

      html中focus的用法是什么

      focus() 方法用于為元素設(shè)置焦點(diǎn)(如果可以設(shè)置)。

      語法為:

      HTMLElementObject.focus()

      示例如下:

      <html> <head> <meta charset="utf-8"> <title>123</title> </head> <body> <input type="text" id="myText" value="文本域"> <p>點(diǎn)擊按鈕設(shè)置或移除以上文本域的焦點(diǎn)。</p> <input type="button" onclick="getfocus()" value="獲取焦點(diǎn)"> <input type="button" onclick="losefocus()" value="移除焦點(diǎn)"> <script> function getfocus() {     document.getElementById("myText").focus(); } function losefocus() {     document.getElementById("myText").blur(); } </script> </body> </html>

      輸出結(jié)果:

      html中focus的用法是什么

      推薦教程:《html視頻教程》

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