function disableAllPriceButton(v){
obj=document.getElementById("APB_1");
if(!v)
{
obj.onmouseover=function(){this.className='pai_bidactionhover';};
obj.onmouseout=function(){this.className='pai_bidaction';};
obj.detachEvent ("onclick",addPrice);
obj.attachEvent("onclick",addPrice);
obj.className="pai_bidaction";
}else{
obj.onmouseover=function(){};
obj.onmouseout=function(){};
obj.detachEvent ("onclick",addPrice);
obj.className="pai_bidactionoff";
}
}
function addPrice(){
alert(event.srcElement.id);
}
obj=document.getElementById("APB_1");
if(!v)
{
obj.onmouseover=function(){this.className='pai_bidactionhover';};
obj.onmouseout=function(){this.className='pai_bidaction';};
obj.detachEvent ("onclick",addPrice);
obj.attachEvent("onclick",addPrice);
obj.className="pai_bidaction";
}else{
obj.onmouseover=function(){};
obj.onmouseout=function(){};
obj.detachEvent ("onclick",addPrice);
obj.className="pai_bidactionoff";
}
}
function addPrice(){
alert(event.srcElement.id);
}
本文转自 OldHawk 博客园博客,原文链接:http://www.cnblogs.com/taobataoma/archive/2007/09/24/904146.html,如需转载请自行联系原作者