<html><head><script type="text/javascript" src="/jquery/jquery.js"></script><script type="text/javascript">$(document).ready(function(){ $("input").select(function(){ $("input").after(" Text marked!"); }); $("button").click(function(){ $("input").select(); }); });</script></head><body><input type="text" name="FirstName" value="Hello World" /><p>请试着选取输入域中的文本,看看会发生什么。</p><button>触发输入域中的 select 事件</button></body></html>