可以参照以下案例$(".test").onclick = function(){$(this).css({"background": "red"});};改为:$(".test").click = function(){$(this).css({"background-color": "red"});};jquery所有的事件绑定都没有on这个关键字。另外,jquery的事件绑定需要放到readyfunction中去。具体来说