学会使用class或其他自定义属性同时控制多个标签 ,不要总使用id 进行逐个控制 ,jquery 不易书写

$(body).find("not(.vnn)").click(function(){
alert("fd");
$("#indestryjiegou").html("");
$("#indestryjiegouEr").html("");
$("#indestryjiegouSan").html("");
});

 

not  不常用 ,因为 not外元素不可控 ,可能会很多

而不是 

$(body).find("not(id=vnn)").find().find().click(function(){

 

 

posted on 2013-04-16 10:52  远方的人  阅读(215)  评论(0编辑  收藏  举报

导航