html中怎么自动获得搜索文本框的光标焦点
生活随笔
收集整理的這篇文章主要介紹了
html中怎么自动获得搜索文本框的光标焦点
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
<!DOCTYPE html>
<html> <head> <meta charset="utf-8" /> <title>hello</title> </head> <body> <form action="demo_form.php"method="get"> <!--一個頁面只能指定一個autofocus值--><input type="search" name="search1"autofocus/> <input type="submit" value="百度一下" /> </form> </body>
</html>
總結(jié)
以上是生活随笔為你收集整理的html中怎么自动获得搜索文本框的光标焦点的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 数据结构实验之二叉树的建立与遍历
- 下一篇: socket网络编程实现远程备份