【示例】 预览效果 源代码 在模拟器中预览 JS window.onload = function(){ document.getElementById("autoSelected").select();//调用浏览器内置的文本选定方法 }; 下载源代码