jquery:
    $('input[type="radio"]').click(function(e){
        
if($(this).val()==1){
            
if(!valid_form()){
                e.preventDefault(); 
//取消事件
               // e.stopPropagation(); //停止事件冒泡
            }
        }
    });
 


prototype:


$('button_id').observe('click',function(e){
  Event.stop();
});

 

相关文章: