|
üũ¹Ú½º ¼±ÅÃȽ¼ö¸¦ Á¦ÇÑÇϱâ / Çѹø¿¡
¸ðµÎ ¼±ÅÃÇϱâ
¢º üũ¹Ú½º
¼±ÅÃȽ¼ö¸¦ Á¦ÇÑÇϱâ
<html>
<head>
<script language="JavaScript">
<!--
// ¼³Á¤ ½ÃÀÛ
var maxChecked = 3;
var totalChecked = 0;
// ¼³Á¤ ³¡
function CountChecked(field) {
if (field.checked)
totalChecked += 1;
else
totalChecked -= 1;
if (totalChecked > maxChecked) {
alert ("ÃÖ´ë 3°³ ±îÁö¸¸ °¡´ÉÇÕ´Ï´Ù.");
field.checked = false;
totalChecked -= 1;
}
}
function ResetCount(){
totalChecked = 0;
}
//-->
</script>
</head>
<body>
<FORM action=" " method=post name=Check>
<table align="left">
<tr><td>
ÁÁ¾ÆÇÏ´Â À½½Ä 3°³¸¸ ü±×ÇØÁÖ¼¼¿ë~~<br>
<INPUT name=1 onclick=CountChecked(this)
type=checkbox> ±èÄ¡Âî°Ô<BR>
<INPUT name=2 onclick=CountChecked(this)
type=checkbox> ÄÉÀÍ<BR>
<INPUT name=3 onclick=CountChecked(this)
type=checkbox> ¾ÆÀ̽ºÅ©¸²<BR>
<INPUT name=4 onclick=CountChecked(this)
ºÒ°í±â<BR>
<INPUT name=5 onclick=CountChecked(this)
Çع°ÅÁ<BR>
<INPUT name=6 onclick=CountChecked(this)
»þºê»þºê<BR>
<INPUT name=7 onclick=CountChecked(this)
»ï°ã»ì<BR>
<INPUT name=8 onclick=CountChecked(this)
ÇÇÀÚ<BR>
<INPUT name=9 onclick=CountChecked(this)
µÈÀåÂî°Ô<BR>
<INPUT name=10 onclick=CountChecked(this)
ºÒ³«Àü°ñ<BR>
<INPUT name=11 onclick=CountChecked(this)
µ·±î½º<BR>
<INPUT name=12 onclick=CountChecked(this)
Æ¢±è <BR>
<INPUT name=13 onclick=CountChecked(this)
¶±ººÀÌ <BR><BR>
<INPUT type=submit value=Submit>
<INPUT onclick=ResetCount()
type=reset value=Reset>
</td></tr>
</table>
</FORM>
</body>
</html>
|
¢º Çѹø¿¡
¸ðµÎ ¼±ÅÃÇϱâ_(üũ¹Ú½º·Î Á¦¾î)
<html>
<head>
<script language="JavaScript">
function CheckAll(objChkBox)
{
bChecked = (objChkBox.checked)?true:false
for (x=0;x<objChkBox.form.length;x++)
{
objChkBox.form.elements[x].checked = bChecked;
}
}
</script>
</head> <body>
<form>
¸ðµÎ ¼±Åà : <input type="checkbox" onclick="CheckAll(this)"><br>
<input type="checkbox"><br>
<input type="checkbox"><br>
<input type="checkbox"><br>
<input type="checkbox"><br>
</form> </body>
</html> |
¢º Çѹø¿¡
¸ðµÎ ¼±ÅÃÇϱâ_(¹öÆ°À¸·Î Á¦¾î)
<html>
<head>
<script language="JavaScript">
<!--
var checkflag = "false";
function check(field) {
if (checkflag == "false") {
for (i = 0; i < field.length; i++) {
field[i].checked = true;}
checkflag = "true";
return "Uncheck All"; }
else {
for (i = 0; i < field.length; i++) {
field[i].checked = false; }
checkflag = "false";
return "Check All"; }
}
//-->
</script> </head> <body>
<form>
<input type=button value="Check
All" onClick="this.value=check(this.form.list)"><br>
<input type=checkbox name=list
><br>
<input type=checkbox name=list
><br>
<input type=checkbox name=list
><br>
<input type=checkbox name=list
><br>
<input type=checkbox name=list
><br> </form> </body> </html>
|
|
|
|
|