¥¯¥¤¥º¤ä¿´Íý¥Æ¥¹¥È¤Ë»È¤¨¤ë¥¹¥¯¥ê¥×¥È¤Ç¤¹¡£
¼ÁÌä¤ËÂФ¹¤ëÅú¤¨¤òÁª¤Ó¡¢¥Ü¥¿¥ó¤ò²¡¤¹¤È¥À¥¤¥¢¥í¥°¤Ç·ë²Ì¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£
¤Þ¤¿¡¢Åú¤¨¤òÁªÂò¤»¤º¤Ë¥Ü¥¿¥ó¤ò²¡¤¹¤È¡¢¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£
¤³¤Î¥¹¥¯¥ê¥×¥È¤Ï¡¢1¤Ä¤Î¥Ú¡¼¥¸¤ËÊ£¿ô¤Î¼ÁÌä¤òÀßÃÖ¤¹¤ë»ö¤¬½ÐÍè¤Þ¤¹¡£
¡¦¥µ¥ó¥×¥ë¤ò¸«¤ë
¡¦¥½¡¼¥¹¤òÊݸ¤¹¤ë ¡Ê±¦¥¯¥ê¥Ã¥¯¢ª¡ÖÂоݤò¥Õ¥¡¥¤¥ë¤ËÊݸ¡×or¡Ö¥ê¥ó¥¯¤ò̾Á°¤òÉÕ¤±¤ÆÊݸ¡×¤·¤Æ²¼¤µ¤¤¡£¡Ë
¡¦¥½¡¼¥¹¤ò¸«¤ë ¡¦²òÀâ¤ò¸«¤ë
[ ¥½¡¼¥¹ ]
<html><head>
<script language="JavaScript">
<!--//Copyright (C) WEST MiRa http://www.west-mira.jp
function test(doko){
errors="Åú¤¨¤òÁªÂò¤·¤Æ²¼¤µ¤¤¡£";
dore=-1;
for(i=0; i<3; i++)
if(document.forms[doko].elements[i].checked==true)dore=document.forms[doko].elements[i].value;
if(dore==-1)alert(errors);
else alert(dore);}
//-->
</script>
</head>
<body>
¼ÁÌä1¡§¤µ¤Æ¡¢»ä¤Îº£¤Î¾õÂÖ¤òÅö¤Æ¤Æ¤¯¤À¤µ¤¤¡£
<form name="form1">
<input type="radio" name="q1" value="¤½¤Î¤È¡Á¤ê">»ä¤Ï¤¤¤Þ̲¤¤<br>
<input type="radio" name="q1" value="¤Ï¤º¤ì">»ä¤Ï¤¤¤Þ¤ªÊ¢¤¬¶õ¤¤¤Æ¤¤¤ë<br>
<input type="radio" name="q1" value="¤¤¤ä¡¢Åö¤¿¤Ã¤Æ¤ë¤±¤É¡Ä">»ä¤Ï¤¤¤Þ¤ª¶â¤¬¤Ê¤¤<br>
<input type="button" value="·ë²Ì" onClick="test('form1');">
</form>
<br>
¼ÁÌä2¡§ÌÀÆü¤ÏÀ²¤ì¤ë¤Ç¤·¤ç¤¦¤«¡©
<form name="form2">
<input type="radio" name="q1" value="ÌÀÆü¤Ë¤Ê¤é¤Ê¤¤¤È¤ï¤«¤ê¤Þ¤»¤ó">¤Ï¤¤<br>
<input type="radio" name="q1" value="¤Ö¡Á¤Ã¡ª">¤¤¤¤¤¨<br>
<input type="radio" name="q1" value="¤½¤¦¤À¤è¤Í">¤É¤Á¤é¤È¤â¸À¤¨¤Ê¤¤<br>
<input type="button" value="·ë²Ì" onClick="test('form2');">
</form>
¡¡¡¦
¡¡¡¦
¡¡¡¦
</body></html>
[ ²òÀâ ]
¤Þ¤º²¼¤ÎÊý¤ÎHTMLÉôʬ¤ò¤´Í÷²¼¤µ¤¤¡£
ºÇ½é¤Ë¡¢¼ÁÌä»ö¹à¤òÊѹ¹¤·¤Þ¤¹¡£
¡Ö¤µ¤Æ¡¢»ä¤Îº£¤Î¾õÂÖ¤òÅö¤Æ¤Æ¤¯¤À¤µ¤¤¡£¡×¤Ë¡¢1ÈÖÌܤμÁÌä»ö¹à¤ò½ñ¤¤¤Æ¤¯¤À¤µ¤¤¡£
³¤¤¤Æ¡¢Åú¤¨¤ÎÁªÂò»èÉôʬ¤ò½ñ¤´¹¤¨¤Æ²¼¤µ¤¤¡£
1ÈÖÌܤÎÁªÂò»è¤Ï¡¢¡Ö»ä¤Ï¤¤¤Þ̲¤¤¡×¡Ö»ä¤Ï¤¤¤Þ¤ªÊ¢¤¬¶õ¤¤¤Æ¤¤¤ë¡×¡Ö»ä¤Ï¤¤¤Þ¤ª¶â¤¬¤Ê¤¤¡×¤Î3¤Ä¤Ç¤¹¡£
¤½¤·¤Æ¡¢³ÆÁªÂò»è¤ÎÃÍÉôʬ¤Ë¡¢Åú¤¨¤òµÆþ¤·¤Æ¤ª¤¤Þ¤¹¡£
Î㤨¤Ð1ÈÖÌܤÎÁªÂò»è¤Î¾ì¹ç¡¢
<input type="radio" name="q1" value="¤½¤Î¤È¡Á¤ê">»ä¤Ï¤¤¤Þ̲¤¤<br>
¡Ö¤½¤Î¤È¡Á¤ê¡×¤ÎÉôʬ¤¬¡¢Åú¤¨¤Ë¤Ê¤ê¤Þ¤¹¡£
¤³¤³¤â¤ª¹¥¤¤Êʸ»ú¤òµÆþ¤·¤Æ¤¯¤À¤µ¤¤¡£
¤½¤Î¤Þ¤Þ¡Ö¤Ï¤º¤ì¡×¤Ç¤â·ë¹½¤Ç¤¹¤·¡¢¡Ö¤ª¤·¤¤¡×¤È¤«¤Ç¤â·ë¹½¤Ç¤¹¡£
¼¡¤ËƱ¤¸Í×ÎΤǡ¢2ÈÖÌܤμÁÌä»ö¹à¤òÊѹ¹¤·¤Þ¤¹¡£
¡ÖÌÀÆü¤ÏÀ²¤ì¤ë¤Ç¤·¤ç¤¦¤«¡©¡×¤ÎÉôʬ¤Ë¡¢¤ª¹¥¤¤Ê¼ÁÌä¤ò¤ª½ñ¤²¼¤µ¤¤¡£
¤Ç¡¢Æ±¤¸Í×ÎΤÇÁªÂò»è¤È¡¢¤½¤ÎÆâÉô¤ËÊÝͤ·¤Æ¤¤¤ëÅú¤¨¤òÊѹ¹¤·¤Æ²¼¤µ¤¤¡£
¤µ¤é¤Ë¼ÁÌä»ö¹à¤òÁý¤ä¤·¤¿¤¤¾ì¹ç¤Ï¡¢¤Þ¤º
¼ÁÌä2¡§ÌÀÆü¤ÏÀ²¤ì¤ë¤Ç¤·¤ç¤¦¤«¡©
<form name="form2">
<input type="radio" name="q1" value="ÌÀÆü¤Ë¤Ê¤é¤Ê¤¤¤È¤ï¤«¤ê¤Þ¤»¤ó">¤Ï¤¤<br>
<input type="radio" name="q1" value="¤Ö¡Á¤Ã¡ª">¤¤¤¤¤¨<br>
<input type="radio" name="q1" value="¤½¤¦¤À¤è¤Í">¤É¤Á¤é¤È¤â¸À¤¨¤Ê¤¤<br>
<input type="button" value="·ë²Ì" onClick="test('form2');">
</form>
¤ò¥³¥Ô¡¼¥Ú¡¼¥¹¥È¤·¤Æ²¼¤µ¤¤¡£
¤½¤·¤ÆƱ¤¸Í×ÎΤǼÁÌä»ö¹à¡¢ÁªÂò»è¡¢Åú¤¨¤òÊѹ¹¤·¤Æ²¼¤µ¤¤¡£
¤Ç¡¢ºÇ¸å¤Ë¡Öform2¡×¤È½ñ¤«¤ì¤¿¾ì½ê¤ò¡¢¿ô»ú¤ÎÉôʬ¤ò1¤Ä·«¤ê¾å¤²¤Æ¡Öform3¡×¤Ë¤·¤Æ²¼¤µ¤¤¡£
2¥«½êͤê¤Þ¤¹¤«¤é¡¢É¬¤º2¥«½ê¤È¤âÊѹ¹¤·¤Æ²¼¤µ¤¤¡£
Î㤨¤Ð¼ÁÌä»ö¹à¤ò1¤ÄÁý¤ä¤¹¾ì¹ç¡¢°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
Êѹ¹Á° |
¼ÁÌä1¡§¤µ¤Æ¡¢»ä¤Îº£¤Î¾õÂÖ¤òÅö¤Æ¤Æ¤¯¤À¤µ¤¤¡£
<form name="form1">
<input type="radio" name="q1" value="¤½¤Î¤È¡Á¤ê">»ä¤Ï¤¤¤Þ̲¤¤<br>
<input type="radio" name="q1" value="¤Ï¤º¤ì">»ä¤Ï¤¤¤Þ¤ªÊ¢¤¬¶õ¤¤¤Æ¤¤¤ë<br>
<input type="radio" name="q1" value="¤¤¤ä¡¢Åö¤¿¤Ã¤Æ¤ë¤±¤É¡Ä">»ä¤Ï¤¤¤Þ¤ª¶â¤¬¤Ê¤¤<br>
<input type="button" value="·ë²Ì" onClick="test('form1');">
</form>
<br>
¼ÁÌä2¡§ÌÀÆü¤ÏÀ²¤ì¤ë¤Ç¤·¤ç¤¦¤«¡©
<form name="form2">
<input type="radio" name="q1" value="ÌÀÆü¤Ë¤Ê¤é¤Ê¤¤¤È¤ï¤«¤ê¤Þ¤»¤ó">¤Ï¤¤<br>
<input type="radio" name="q1" value="¤Ö¡Á¤Ã¡ª">¤¤¤¤¤¨<br>
<input type="radio" name="q1" value="¤½¤¦¤À¤è¤Í">¤É¤Á¤é¤È¤â¸À¤¨¤Ê¤¤<br>
<input type="button" value="·ë²Ì" onClick="test('form2');">
</form>
|
Êѹ¹¸å |
¼ÁÌä1¡§¤µ¤Æ¡¢»ä¤Îº£¤Î¾õÂÖ¤òÅö¤Æ¤Æ¤¯¤À¤µ¤¤¡£
<form name="form1">
<input type="radio" name="q1" value="¤½¤Î¤È¡Á¤ê">»ä¤Ï¤¤¤Þ̲¤¤<br>
<input type="radio" name="q1" value="¤Ï¤º¤ì">»ä¤Ï¤¤¤Þ¤ªÊ¢¤¬¶õ¤¤¤Æ¤¤¤ë<br>
<input type="radio" name="q1" value="¤¤¤ä¡¢Åö¤¿¤Ã¤Æ¤ë¤±¤É¡Ä">»ä¤Ï¤¤¤Þ¤ª¶â¤¬¤Ê¤¤<br>
<input type="button" value="·ë²Ì" onClick="test('form1');">
</form>
<br>
¼ÁÌä2¡§ÌÀÆü¤ÏÀ²¤ì¤ë¤Ç¤·¤ç¤¦¤«¡©
<form name="form2">
<input type="radio" name="q1" value="ÌÀÆü¤Ë¤Ê¤é¤Ê¤¤¤È¤ï¤«¤ê¤Þ¤»¤ó">¤Ï¤¤<br>
<input type="radio" name="q1" value="¤Ö¡Á¤Ã¡ª">¤¤¤¤¤¨<br>
<input type="radio" name="q1" value="¤½¤¦¤À¤è¤Í">¤É¤Á¤é¤È¤â¸À¤¨¤Ê¤¤<br>
<input type="button" value="·ë²Ì" onClick="test('form2');">
</form>
<br>
¼ÁÌä3¡§º£¤Ï²¿·î¤Ç¤·¤ç¤¦¤«¡©
<form name="form3">
<input type="radio" name="q1" value="¤â¤¦½ª¤ï¤Ã¤¿¤è">10·î<br>
<input type="radio" name="q1" value="Àµ²ò">11·î<br>
<input type="radio" name="q1" value="¤â¤¦¤¹¤°¤Í">12·î<br>
<input type="button" value="·ë²Ì" onClick="test('form3');">
</form>
|
Êѹ¹¤Ï¡¢°Ê¾å¤Ç¤¹¡£
¡ÊÊä¡Ë
Åú¤¨¤ò3Âò¤«¤é2Âò¡¢¤Þ¤¿¤Ï4Âò¤Ê¤É¥é¥¸¥ª¥Ü¥¿¥ó¤Î¿ô¤òÊѹ¹¤·¤¿¤¤¾ì¹ç¤Ï¡¢
¤Þ¤º¥Ü¥Ç¥£Æâ¤Ç¥é¥¸¥ª¥Ü¥¿¥ó¤Î¿ô¤òÁý¸º¤µ¤»¤Æ¤¯¤À¤µ¤¤¡£
¼¡¤Ë¡¢¾å¤«¤é8¹ÔÌܤˤ¢¤ë
for(i=0; i<3; i++)
¤Î¡Ö3¡×¤ÎÉôʬ¤ò¡¢¥é¥¸¥ª¥Ü¥¿¥ó¤Î¿ô¤Ëľ¤·¤Æ¤¯¤À¤µ¤¤¡£
2Âò¤Ë¤·¤¿¤¤¤Ê¤é¤Ð
for(i=0; i<2; i++)
¤Ë¤Ê¤ê¤Þ¤¹¡£
|