Jquery、Prototype 中终止事件

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();
});

 

posted @ 2011-07-12 16:38  涛光  阅读(3512)  评论(0编辑  收藏  举报