在HTML5中,页面打开后,需要指定的控件自动获得焦点很简单,只需要一个属性就可以实现 - autofocus。 示例如下: <input type="text" autofocus="" name="WriterName"> 相关文章: