$(document).ready(function() { $("[id=text]").click(function(){ alert("Hi.."); }); }); 恩 别人的代码。。互相学习。。。