<img src="image1.png" onclick="handler(this.src)" />
function handler(event, handler_src){
if(onClickOn){
companyJes(handler_src);
}else{
event.preventDefault(); // don't do anything
event.stopPrpagation(); // really don't do anything
return false; //make sure you don't do anything
}
}
on onclick handler(what should i put this ?, this.src);
我应该在onclick上添加变量来替换事件?
我测试了handler(event, this.src);
,但它确实有效。