Results 1 to 4 of 4
Thread: CheckBox- javascript.
Hybrid View
-
28th October 2010 20:26 #1
CheckBox- javascript.
selectBox- . ?
:
Code:<form name="selection" action="Delete" method="post" onsubmit="warnBeforeDelete(this)">
, ( / ).Code:function warnBeforeDelete(form){ if(confirm('Achtung! Sind Sie sicher, dass Sie die ausgewählten Computer löschen möchten ?')) return true; else return false; }Last edited by aphex; 28th October 2010 at 21:10.
We are drowning in information, but starving for knowledge and time!
-
28th October 2010 20:49 #2
? onsubmit event , .
JS - true confirm-a.
jQuery -.
:
http://lab.artlung.com/validate-checkbox/''? * *
- !
...
-
28th October 2010 20:57 #3
CheckBox-. python . ? -.
Update:
Code:var inputs = document.getElementsByTagName("input"); var count = 0; for (var i = 0; i < inputs.length; i++) { if (inputs[i].type == "checkbox" && inputs[i].checked) { count++; } }Last edited by aphex; 28th October 2010 at 22:15.
We are drowning in information, but starving for knowledge and time!
-
29th October 2010 08:54 #4Registered User
Join Date: Jul:2005
Location: Sofiq
Posts: 2,798
:
Code:<form action="" method="post" onsubmit="return warnBeforeDelete(this);">
Code:function warnBeforeDelete(form) { var list = form.elements; for(var i=0;i<list.length;i++){ if(list[i].type == 'checkbox' && list[i].checked === true) return true; } alert('No checkbox selected!'); return false; }




Reply With Quote
Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in