function _setSrc=function(_div){
var select=$(_div).attr('select');
if (select == "1") {
$(_div).html("");
$(_div).removeAtrr('select').attr('select','0');
}
else {
$(_div).html("");
$(_div).removeAtrr('select').attr('select','1');
}
}
你试试 用JQ的话就尽量全用别一会用JS的方法一会用JQ 因为JQ得到元素后 就不是单纯的DOM对象了 转换为了JQ对象 他会具有JQ的方法
导入jquery,在script中写:
$.(function(){
$(this).find("img").attr("src","../images/imgBody.gif");
},function(){
$(this).find("img").attr("src","../images/imgBody_green.gif");
});
});
标准的jquery代码
$(selectDiv).html(“");