CSS 实现输入框点击自动选中所有内容(input+textarea) 一、input 实现代码: <input onfocus="this.select()"> 二、textarea 实现代码: <textarea onfocus="this.select()">