2016-09-15 180 views

回答

0

您可以return false的複選框單擊事件。這將停止事件冒泡(stopPropogation())並阻止默認操作(preventDefault())用於點擊事件,如發回服務器。

$(document).ready(function(){ 

$('input:checkbox[name*=multiselect_]').click(function(){ 
    return false; 
}); 

}); 
+0

我在哪裏可以做,在jquery.ui.min.js文件 –

+0

沒有別碰那個文件... instaed爲此在腳本文件 –

+0

http://www.erichynds.com/examples/jquery -ui-multiselect-widget/demos /正在使用的是 –

0

如果您可以提供標記,那麼這將使您的問題更清楚。但是如果在複選框上有一個點擊事件,那麼你應該做的就是防止它。

$('checkbox').on('click',function(e){ 
//prevent the event 
e.preventDefault(); 

}); 
相關問題