總結的一些公用函數庫!

1:全選和全不選

function checkboxAdmincode(){
	var messages =  $('input[name=projectidCheckbox]');
	for(var i = 0; i < messages.length; i++) {
		if(messages[i].checked){
			$("input[name='projectidCheckbox']").each(function() {
				$(this).attr("checked", false);
			});
			return;
		}else{
			$("input[name='projectidCheckbox']").each(function() {
				$(this).attr("checked", true);
			});
			return;
		}
	}
}


發佈了41 篇原創文章 · 獲贊 39 · 訪問量 30萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章