WEST MiRa(1,739 Byte)
JavaScript(1,601 Byte)
ƒjƒbƒZƒ“

¢£ JavaScript - ¥µ¥ó¥×¥ë½¸(257¼ïÎà) - ¥Õ¥©¡¼¥à
¡¡¡¡ - ¥Ý¥Ã¥×¥¢¥Ã¥×¥á¥Ë¥å¡¼¤Î¹àÌÜÊѹ¹

2¤Ä¤Î¥Ý¥Ã¥×¥¢¥Ã¥×¥á¥Ë¥å¡¼¤¬¤¢¤ê¤Þ¤¹¡£
1¤Ä¤Î¥Ý¥Ã¥×¥¢¥Ã¥×¥á¥Ë¥å¡¼¤Ç¹àÌܤòÁªÂò¤¹¤ë¤È¡¢¤â¤¦1¤Ä¤Î¥Ý¥Ã¥×¥¢¥Ã¥×¥á¥Ë¥å¡¼¤ÎÆâÍƤ¬ÊѤï¤ê¤Þ¤¹¡£

¡¦¥µ¥ó¥×¥ë¤ò¸«¤ë
¡¦¥½¡¼¥¹¤òÊݸ¤¹¤ë
¡Ê±¦¥¯¥ê¥Ã¥¯¢ª¡ÖÂоݤò¥Õ¥¡¥¤¥ë¤ËÊݸ¡×or¡Ö¥ê¥ó¥¯¤ò̾Á°¤òÉÕ¤±¤ÆÊݸ¡×¤·¤Æ²¼¤µ¤¤¡£¡Ë
¡¦¥½¡¼¥¹¤ò¸«¤ë
¡¦²òÀâ¤ò¸«¤ë





[ ¥½¡¼¥¹ ]

<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">

<script language="JavaScript">
<!--//Copyright (C) WEST MiRa http://www.west-mira.jp

	//1¤ÄÌܤ¬ÁªÂò¤µ¤ì¤¿»þ¤Ë2¤ÄÌܤΥե©¡¼¥à¤Ëɽ¼¨¤¹¤ëÆâÍÆ
	names1=new Array("JavaScript","¥µ¥ó¥×¥ë½¸¡Ê¥ê¥ó¥¯¡Ë","¥µ¥ó¥×¥ë½¸¡Ê¥Õ¥©¡¼¥à¡Ë");

	//2¤ÄÌܤ¬ÁªÂò¤µ¤ì¤¿»þ¤Ë2¤ÄÌܤΥե©¡¼¥à¤Ëɽ¼¨¤¹¤ëÆâÍÆ
	names2=new Array("JavaScript","¥µ¥ó¥×¥ë½¸¡Ê¥Õ¥©¡¼¥à¡Ë","¥µ¥ó¥×¥ë½¸¡Ê¥ê¥ó¥¯¡Ë","JavaScript");

	//3¤ÄÌܤ¬ÁªÂò¤µ¤ì¤¿»þ¤Ë2¤ÄÌܤΥե©¡¼¥à¤Ëɽ¼¨¤¹¤ëÆâÍÆ
	names3=new Array("¥µ¥ó¥×¥ë½¸¡Ê¥ê¥ó¥¯¡Ë","¥µ¥ó¥×¥ë½¸¡Ê¥Õ¥©¡¼¥à¡Ë");

	//ÆâÍƤò³ÊǼ¤·¤Æ¤¤¤ëÇÛÎó¤ò³ÊǼ¤¹¤ëÇÛÎó
	names=new Array("",names1,names2,names3);

	len=0;
	for(i=0; i<names.length; i++)if(names[i].length > len)len=names[i].length;
	dore=0;
	function SelectChange()
		{
		dore=document.form1.sele1.selectedIndex;
		if(dore != 0)
			{
			atai=0;
			for(i=0; i<len; i++)
				if(names[dore].length < len && names[dore].length <= i)
					{
					document.form2.sele1.options[i-atai]=null;
					atai++;
					}
				else 
					document.form2.sele1.options[i]=new Option(names[dore][i],i);
			}
		}

//-->
</script>

</head>

<body>

<form name="form1">
  <select name="sele1" onChange="SelectChange();">
  <option>
  <option>1¤ÄÌÜ
  <option>2¤ÄÌÜ
  <option>3¤ÄÌÜ
  </select>
</form>
<form name="form2">
  <select name="sele1" size="5">
  <option>¡¡¡¡¡¡  </select>
</form>

</body></html>


[ ²òÀâ ]

¤Þ¤º¡¢1¤ÄÌܤΥݥåץ¢¥Ã¥×¥á¥Ë¥å¡¼¤ÎÆâÍƤòÊѹ¹¤·¤Þ¤¹¡£
¥½¡¼¥¹¤Î²¼¤«¤é13¡Á10¹ÔÌܤò¤´Í÷²¼¤µ¤¤¡£

<option>
<option>1¤ÄÌÜ
<option>2¤ÄÌÜ
<option>3¤ÄÌÜ
¤ÎÉôʬ¤¬¡¢1¤ÄÌܤΥݥåץ¢¥Ã¥×¥á¥Ë¥å¡¼¤Î¹àÌܤǤ¹¡£

¤³¤³¤Ï¤ª¹¥¤­¤Ê¤è¤¦¤Ë¹àÌÜ̾¤òÊѹ¹¤·¤Æ¤¯¤À¤µ¤¤¡£

¤â¤·1¤ÄÌܤΥݥåץ¢¥Ã¥×¥á¥Ë¥å¡¼¤ò¸º¤é¤·¤¿¤¤¤Ê¤é¤Ð¡¢²¼¤«¤é1¹Ô¤º¤Ä¸º¤é¤·¤Þ¤¹¡£

Î㤨¤Ð¡¢1¤Ä¹àÌܤò¸º¤é¤¹¾ì¹ç¤Ï¡¢°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£

Êѹ¹Á°
<form name="form1">
<select name="sele1" onChange="SelectChange();">
<option>
<option>1¤ÄÌÜ
<option>2¤ÄÌÜ
<option>3¤ÄÌÜ
</select>
</form>
Êѹ¹¸å
<form name="form1">
<select name="sele1" onChange="SelectChange();">
<option>
<option>1¤ÄÌÜ
<option>2¤ÄÌÜ
</select>
</form>
¤Þ¤¿¡¢¹àÌܤòÁý¤ä¤¹¾ì¹ç¤Ï¡¢¸º¤é¤¹¾ì¹ç¤ÈÈ¿ÂФËÁý¤ä¤·¤Æ¤¢¤²¤Þ¤¹¡£

¥µ¥ó¥×¥ë¤Ë¹àÌܤò1¤ÄÄɲ乤ë¤È¡¢°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£

Êѹ¹Á°
<form name="form1">
<select name="sele1" onChange="SelectChange();">
<option>
<option>1¤ÄÌÜ
<option>2¤ÄÌÜ
<option>3¤ÄÌÜ
</select>
</form>
Êѹ¹¸å
<form name="form1">
<select name="sele1" onChange="SelectChange();">
<option>
<option>1¤ÄÌÜ
<option>2¤ÄÌÜ
<option>3¤ÄÌÜ
<option>4¤ÄÌÜ
</select>
</form>
¤Ç¤Ï¼¡¤Ë¡¢1¤ÄÌܤΥݥåץ¢¥Ã¥×¥á¥Ë¥å¡¼¤¬ÁªÂò¤µ¤ì¤¿ºÝ¤Ë¡¢ 2¤ÄÌܤΥݥåץ¢¥Ã¥×¥á¥Ë¥å¡¼Êѹ¹¤¹¤ë°Ù¤Î¥Ç¡¼¥¿¤òÍÑ°Õ¤·¤Þ¤¹¡£

¤³¤³¤ÇɬÍפȤʤë¤Î¤Ï¡¢¡ÖÊѹ¹¸å¤Î¹àÌÜ̾¡×¤Ç¤¹¡£
¤½¤Î¥Ç¡¼¥¿¤òÀßÄꤷ¤Æ¤ß¤Þ¤·¤ç¤¦¡£

¥½¡¼¥¹¤Î¾å¤«¤é5¡Á7¹ÔÌܤò¤´Í÷²¼¤µ¤¤¡£
¤½¤Î3¹Ô¤¬Êѹ¹ÍѤΥǡ¼¥¿¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£

names1=new Array("HOME","JavaScript","Library(Link)");
names2=new Array("JavaScript","HOME","Library(Link)","JavaScript");
names3=new Array("Library(Link)","HOME");

¥Ç¡¼¥¿Éôʬ¤òÈ´¤­½Ð¤·¤Æ¤ß¤Þ¤·¤¿¤¬¡¢
1¹ÔÌܤ¬¡Ö1¤ÄÌÜ¡×ÍѤΥǡ¼¥¿¡¢
2¹ÔÌܤ¬¡Ö2¤ÄÌÜ¡×ÍѤΥǡ¼¥¿¡¢
3¹ÔÌܤ¬¡Ö3¤ÄÌÜ¡×ÍѤΥǡ¼¥¿¡¢
¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£

¡ÖHOME¡×¡ÖJavaScript¡×¡ÖLibrary(Link)¡×¤Ê¤É¤Î¹àÌܤ¬¤¢¤ê¤Þ¤¹¤¬¡¢ ¤ª¹¥¤­¤Ê¤è¤¦¤Ë¥Ç¡¼¥¿¤òÊѹ¹¤·¤Æ¤¯¤À¤µ¤¤¡£

¹àÌܤò¸º¤é¤·¤¿¤¤¾ì¹ç¤Ï¡¢¸å¤í¤«¤é¸º¤é¤·¤Æ¤¤¤­¤Þ¤¹¡£
Áý¤ä¤¹¾ì¹ç¤ÏɬÍפʿô¤À¤±¡¢Äɲ䷤Ƥ¯¤À¤µ¤¤¡£

Î㤨¤Ð¡¢2¤ÄÌÜÍѤΥǡ¼¥¿¤«¤é¹àÌܤò1¤Äºï½ü¤·¡¢ 3¤ÄÌÜÍѤΥǡ¼¥¿¤Ë¹àÌܤò1¤ÄÄɲ乤ë¾ì¹ç¤Ï¡¢°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£

Êѹ¹Á°
names1=new Array("HOME","JavaScript","Library(Link)");
names2=new Array("JavaScript","HOME","Library(Link)","JavaScript");
names3=new Array("Library(Link)","HOME");
Êѹ¹¸å
names1=new Array("HOME","JavaScript","Library(Link)");
names2=new Array("JavaScript","HOME","Library(Link)");
names3=new Array("Library(Link)","HOME","JavaScript");
ºï½ü¤¹¤ë¾ì¹ç¡¢Äɲ乤ë¾ì¹ç¤Î¤É¤Á¤é¤Î¾ì¹ç¤Ç¤â¡¢ ¹àÌܤζèÀÚ¤ê¤È¤Ê¤Ã¤Æ¤¤¤ë¡Ö,¡×¤âÊѹ¹¤¹¤ë»ö¤ò˺¤ì¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£


2¤ÄÌܤΥݥåץ¢¥Ã¥×¥á¥Ë¥å¡¼ÍѤΥǡ¼¥¿¤ÎÊѹ¹ÊýË¡¤òÀâÌÀ¤·¤Þ¤·¤¿¤¬¡¢ ¤Ç¤Ï1¤ÄÌܤιàÌܼ«ÂΤò¸º¤é¤·¤¿¤êÁý¤ä¤·¤¿¾ì¹ç¤Ï¤É¤¦¤¹¤ë¤Î¤«¡©

¤³¤ì¤âƱ¤¸¤Ç¤¹¡£
¹àÌÜÍѥǡ¼¥¿¤ò¿·¤¿¤ËºîÀ®¤·¤Þ¤¹¡£

¤¿¤À¤·¡¢1¤ÄÃí°ÕÅÀ¤¬¤¢¤ê¤Þ¤¹¡£

¤Þ¤º¡¢¸º¤é¤·¤¿¾ì¹ç¤«¤éÀâÌÀ¤·¤Þ¤¹¡£

¹àÌܤò¸º¤é¤·¤¿¤¤¾ì¹ç¤Ï¡¢³ºÅö¥Ç¡¼¥¿¤ò³ÊǼ¤·¤Æ¤¤¤ë¹Ô¤òºï½ü¤·¤Þ¤¹¡£

¤½¤·¤Æ¡¢½ÅÍפʤΤϥ½¡¼¥¹¤Î¾å¤«¤é8¹ÔÌܤˤ¢¤ë
names=new Array("",names1,names2,names3);
¤âÊѹ¹¤·¤Ê¤¤¤È¤¤¤±¤Þ¤»¤ó¡£

8¹ÔÌܤò¸«¤Æ¤ß¤Þ¤¹¤È¡¢names1¡¢names2¡¢names3¤Ê¤É¤¬Ê¤ó¤Ç¤¤¤Þ¤¹¤Í¡£
¤³¤ì¤Ï³Æ¥Ç¡¼¥¿¤ò³ÊǼ¤·¤Æ¤¤¤ë¾ì½ê¤Î̾Á°¤Ç¤¹¡£

¤³¤ÎÉôʬ¤â¸º¤é¤¹É¬Íפ¬¤¢¤ê¤Þ¤¹¡£

ÀâÌÀ¤À¤±¤Ç¤Ï¤ï¤«¤ê¤Ë¤¯¤¤¤Ç¤·¤ç¤¦¤«¤é¡¢ ¼ÂºÝ¤Ë¹àÌܤò1¤Ä¸º¤é¤·¤¿¾ì¹ç¤Ï¤É¤¦¤Ê¤ë¤Î¤«¡¢¸«¤Æ¤¯¤À¤µ¤¤¡£

Êѹ¹Á°
names1=new Array("HOME","JavaScript","Library(Link)");
names2=new Array("JavaScript","HOME","Library(Link)","JavaScript");
names3=new Array("Library(Link)","HOME");
names=new Array("",names1,names2,names3);

¡Ä¡Ä

<form name="form1">
<select name="sele1" onChange="SelectChange();">
<option>
<option>1¤ÄÌÜ
<option>2¤ÄÌÜ
<option>3¤ÄÌÜ
</select>
</form>
Êѹ¹¸å
names1=new Array("HOME","JavaScript","Library(Link)");
names2=new Array("JavaScript","HOME","Library(Link)","JavaScript");
names=new Array("",names1,names2);

¡Ä¡Ä

<form name="form1">
<select name="sele1" onChange="SelectChange();">
<option>
<option>1¤ÄÌÜ
<option>2¤ÄÌÜ
</select>
</form>
È¿ÂФ˹àÌܤòÁý¤ä¤·¤¿¾ì¹ç¡£
¤³¤ì¤âº£¤Þ¤Ç¤ÈÍ×ÎΤÏƱ¤¸¤Ç¤¹¤Í¡£

ɬÍפʥǡ¼¥¿¤ò¿·¤¿¤ËÀßÃÖ¤·¤Þ¤¹¡£

¤¿¤À¤·¡¢¤³¤Î»þ¤â¤¦°ì¤ÄÃí°ÕÅÀ¤¬¤¢¤ê¤Þ¤¹¡£
¿·¤¿¤ËÀßÃÖ¤¹¤ë¥Ç¡¼¥¿¤Î³ÊǼ¾ì½ê¤Î̾Á°¡¢¤³¤ì¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£

¥µ¥ó¥×¥ë¤Î¾ì¹ç¤Ç¤¹¤È¡¢³ÊǼ¾ì½ê¤Î̾Á°¤Ï¤½¤ì¤¾¤ìnames1¡¢names2¡¢names3¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
4¤ÄÌܤòÁý¤ä¤¹¾ì¹ç¤Ï¡¢names1¡¢names2¡¢names3¤È¤ÏÊ̤Î̾Á°¤òÉÕ¤±¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£
Ʊ¤¸Ì¾Á°¤òÉÕ¤±¤Æ¤Ï¤¤¤±¤Þ¤»¤ó¡£

¤³¤ì¤âÊѹ¹¤·¤¿¾ì¹ç¤É¤¦¤Ê¤ë¤Î¤«¡¢³Îǧ¤·¤¿Êý¤¬Áᤤ¤Ç¤·¤ç¤¦¡£
°Ê²¼¤ò¤´Í÷²¼¤µ¤¤¡£

Êѹ¹Á°
names1=new Array("HOME","JavaScript","Library(Link)");
names2=new Array("JavaScript","HOME","Library(Link)","JavaScript");
names3=new Array("Library(Link)","HOME");
names=new Array("",names1,names2,names3);

¡Ä¡Ä

<form name="form1">
<select name="sele1" onChange="SelectChange();">
<option>
<option>1¤ÄÌÜ
<option>2¤ÄÌÜ
<option>3¤ÄÌÜ
</select>
</form>
Êѹ¹¸å
names1=new Array("HOME","JavaScript","Library(Link)");
names2=new Array("JavaScript","HOME","Library(Link)","JavaScript");
names3=new Array("Library(Link)","HOME");
names4=new Array("HOME","Library(Link)","HOME");
names=new Array("",names1,names2,names3,names4);

¡Ä¡Ä

<form name="form1">
<select name="sele1" onChange="SelectChange();">
<option>
<option>1¤ÄÌÜ
<option>2¤ÄÌÜ
<option>3¤ÄÌÜ
<option>4¤ÄÌÜ
</select>
</form>
¤³¤ì¤ÇÊѹ¹¤Ï½ª¤ï¤ê¤Ç¤¹¡£


¥Ð¥Ê¡¼¡¢¥ê¥ó¥¯¤Ë¤Ä¤¤¤Æ  ,   ÍøÍѵ¬Ìó  ,   ¥Ø¥ë¥×

Copyright (C) 1998-2007 WEST MiRa. All rights reserved.