html4:
复制代码代码如下:
<form>
<p><label>Username:<input name=search type="text" id="search"></label></p>
<script type="text/javascript">
document.getElementById ('search').focus()
</script>
</form>
html5:
复制代码代码如下:
<form>
<p>
<label>Search:<input name=search autofocus></label>
</p>
</form>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)