謝晒的PHP網頁設計
聯絡E-mail:
sean0704@gmail.com
站內搜尋
Friday, February 6, 2015
[jQuery] 判斷 checkbox 被選取了幾個 (checked) (常用於表單檢查 "至少要選取一個 才能送出" )
if($("input[name='id[]']:
check
ed").length == 0) {
alert("請至少選擇一個ID");
return false;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment