001.
002.
003.
<html>
004.
<head>
005.
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=windows-874"
>
006.
<title>Untitled Document</title>
007.
</head>
008.
009.
<body>
010.
<form name=
"form1"
method=
"post"
action=
""
>
011.
<table width=
"496"
border=
"0"
cellspacing=
"0"
cellpadding=
"5"
>
012.
<tr>
013.
<th scope=
"col"
><select name=
"cusname"
onChange=
"showtext()"
>
014.
<option selected>CUSTOMER</option>
015.
<option>C1</option>
016.
<option>C2</option>
017.
<option>C4</option>
018.
<option>C5</option>
019.
<option>C6</option>
020.
<option>C7</option>
021.
<option>C8</option>
022.
<option>C9</option>
023.
<option>C10</option>
024.
<option>C11</option>
025.
<option>C12</option>
026.
<option>C13</option>
027.
<option>C14</option>
028.
<option>C15</option>
029.
<option>C16</option>
030.
<option>C17</option>
031.
<option>C18</option>
032.
<option>C20</option>
033.
</select></th>
034.
<th scope=
"col"
><select name=
"select1"
onChange=
"changeSelect2(this)"
>
035.
<option value=
"0"
selected>กรุณาเลือกภาควิชา</option>
036.
<option value=
"scin"
>คณะวิทยาศาสตร์</option>
037.
<option value=
"engi"
>คณะวิศวกรรมศาสตร์</option>
038.
<option value=
"arti"
>คณะศิลปศาสตร์</option>
039.
<option value=
"busi"
>คณะบริหารธุรกิจ</option>
040.
<option value=
"econo"
>คณะเศรษฐศาสตร์</option>
041.
</select></th>
042.
</tr>
043.
<tr>
044.
<td><input type=
"text"
name=
"cuscountry"
value =
"COUNTRY"
readonly=
"readonly"
></td>
045.
<td><select name=
"select2"
>
046.
<option selected>กรุณาเลือกภาควิชา</option>
047.
</select></td>
048.
</tr>
049.
<tr>
050.
<td><input type=
"text"
name=
"cuszone"
value=
"ZONE"
readonly=
"readonly"
></td>
051.
<td><select name=
"select3"
>
052.
<option selected>กรุณาเลือกสาขา</option>
053.
</select></td>
054.
</tr>
055.
</table>
056.
<br>
057.
<!-- ใส่ชื่ออัตโนมัติ-->
058.
<script language=
"javascript"
>
059.
060.
var
shortcut=document.form1
061.
var
aut=
new
Array()
062.
var
aut1=
new
Array()
063.
064.
065.
066.
aut[0]=
"COUNTRY"
067.
aut[1]=
"PORTUGAL"
068.
aut[2]=
"U.S.A."
069.
aut[3]=
"ARGENTINA"
070.
aut[4]=
"SPAIN"
071.
aut[5]=
"GREECE"
072.
aut[6]=
"SPAIN"
073.
aut[7]=
"CANADA"
074.
aut[8]=
"PERU"
075.
aut[9]=
"PERU"
076.
aut[10]=
"PERU"
077.
aut[11]=
"PORTUGAL"
078.
aut[12]=
"GREECE"
079.
aut[13]=
"PORTUGAL"
080.
aut[14]=
"POLAND"
081.
aut[15]=
"ITALY"
082.
aut[16]=
"THE NETHERLANDS"
083.
aut[17]=
"SPAIN"
084.
aut[18]=
"MEXICO"
085.
aut[19]=
"KOREA"
086.
aut[20]=
"PERU"
087.
088.
aut1[0]=
"ZONE"
089.
aut1[1]=
"EUROPE"
090.
aut1[2]=
"AMERICA"
091.
aut1[3]=
"AMERICA"
092.
aut1[4]=
"EUROPE"
093.
aut1[5]=
"EUROPE"
094.
aut1[6]=
"EUROPE"
095.
aut1[7]=
"AMERICA"
096.
aut1[8]=
"AMERICA"
097.
aut1[9]=
"AMERICA"
098.
aut1[10]=
"AMERICA"
099.
aut1[11]=
"EUROPE"
100.
aut1[12]=
"EUROPE"
101.
aut1[13]=
"EUROPE"
102.
aut1[14]=
"EUROPE"
103.
aut1[15]=
"EUROPE"
104.
aut1[16]=
"EUROPE"
105.
aut1[17]=
"EUROPE"
106.
aut1[18]=
"AMERICA"
107.
aut1[19]=
"ASIA"
108.
aut1[20]=
"AMERICA"
109.
110.
function
showtext(){
111.
shortcut.cuscountry.value=aut[shortcut.cusname.selectedIndex]
112.
shortcut.cuszone.value=aut1[shortcut.cusname.selectedIndex]
113.
}
114.
function
changeSelect2(obj){
115.
var
theform = obj.form;
116.
theform.select2.length=0;
117.
theform.select3.length=0;
118.
switch
(obj.value){
119.
case
"0"
:
120.
{
121.
theform.select2.options[0]=
new
Option(
'กรุณาเลือกภาควิชา'
,
'กรุณาเลือกภาควิชา'
);
122.
theform.select3.options[0]=
new
Option(
'กรุณาเลือกสาขา'
,
'กรุณาเลือกสาขา'
);
123.
124.
theform.select2=false;
125.
theform.select3=false;
126.
}
127.
break
;
128.
129.
case
"scin"
:
130.
{
131.
theform.select2.options[0]=
new
Option(
'กรุณาเลือกภาควิชา'
,
'กรุณาเลือกภาควิชา'
);
132.
theform.select2.options[1]=
new
Option(
'วิทย์1'
,
'วิทย1'
);
133.
theform.select2.options[2]=
new
Option(
'วิทย์2'
,
'วิทย์2'
);
134.
theform.select2.options[3]=
new
Option(
'วิทย์3'
,
'วิทย3'
);
135.
theform.select2.options[4]=
new
Option(
'วิทย์4'
,
'วิทย์4'
);
136.
theform.select2.options[5]=
new
Option(
'วิทย์5'
,
'วิทย์5'
);
137.
138.
theform.select3.options[0]=
new
Option(
'กรุณาเลือกสาขา'
,
'กรุณาเลือกสาขา'
);
139.
theform.select3.options[1]=
new
Option(
'วิทย์สาขา1'
,
'วิทย์สาขา1'
);
140.
theform.select3.options[2]=
new
Option(
'วิทย์สาขา2'
,
'วิทย์สาขา2'
);
141.
theform.select3.options[3]=
new
Option(
'วิทย์สาขา3'
,
'วิทย์สาขา3'
);
142.
theform.select3.options[4]=
new
Option(
'วิทย์สาขา4'
,
'วิทย์สาขา4'
);
143.
theform.select3.options[5]=
new
Option(
'วิทย์สาขา5'
,
'วิทย์สาขา5'
);
144.
145.
theform.select2=false;
146.
theform.select3=false;
147.
}
148.
break
;
149.
150.
151.
case
"engi"
:
152.
{
153.
theform.select2.options[0]=
new
Option(
'กรุณาเลือกภาควิชา'
,
'กรุณาเลือกภาควิชา'
);
154.
theform.select2.options[1]=
new
Option(
'วิศวะ1'
,
'วิศวะ1'
);
155.
theform.select2.options[2]=
new
Option(
'วิศวะ2'
,
'วิศวะ2'
);
156.
theform.select2.options[3]=
new
Option(
'วิศวะ3'
,
'วิศวะ3'
);
157.
theform.select2.options[4]=
new
Option(
'วิศวะ4'
,
'วิศวะ4'
);
158.
theform.select2.options[5]=
new
Option(
'วิศวะ5'
,
'วิศวะ5'
);
159.
theform.select2.options[6]=
new
Option(
'วิศวะ6'
,
'วิศวะ6'
);
160.
theform.select2.options[7]=
new
Option(
'วิศวะ7'
,
'วิศวะ7'
);
161.
theform.select2.options[8]=
new
Option(
'วิศวะ8'
,
'วิศวะ8'
);
162.
theform.select2.options[9]=
new
Option(
'วิศวะ9'
,
'วิศวะ9'
);
163.
theform.select2.options[10]=
new
Option(
'วิศวะ10'
,
'วิศวะ10'
);
164.
theform.select2.options[11]=
new
Option(
'วิศวะ11'
,
'วิศวะ11'
);
165.
theform.select2.options[12]=
new
Option(
'วิศวะ12'
,
'วิศวะ12'
);
166.
167.
theform.select3.options[0]=
new
Option(
'กรุณาเลือกสาขา'
,
'กรุณาเลือกสาขา'
);
168.
theform.select3.options[1]=
new
Option(
'วิศวะสาขา1'
,
'วิศวะสาขา1'
);
169.
theform.select3.options[2]=
new
Option(
'วิศวะสาขา2'
,
'วิศวะสาขา2'
);
170.
theform.select3.options[3]=
new
Option(
'วิศวะสาขา3'
,
'วิศวะสาขา3'
);
171.
theform.select3.options[4]=
new
Option(
'วิศวะสาขา4'
,
'วิศวะสาขา4'
);
172.
theform.select3.options[5]=
new
Option(
'วิศวะสาขา5'
,
'วิศวะสาขา5'
);
173.
theform.select2=false;
174.
theform.select3=false;
175.
}
176.
break
;
177.
178.
179.
case
"arti"
:
180.
{
181.
theform.select2.options[0]=
new
Option(
'กรุณาเลือกภาควิชา'
,
'กรุณาเลือกภาควิชา'
);
182.
theform.select2.options[1]=
new
Option(
'ศิลป1'
,
'ศิลป1'
);
183.
theform.select2.options[2]=
new
Option(
'ศิลป2'
,
'ศิลป2'
);
184.
theform.select2.options[3]=
new
Option(
'ศิลป3'
,
'ศิลป3'
);
185.
186.
theform.select3.options[0]=
new
Option(
'กรุณาเลือกสาขา'
,
'กรุณาเลือกสาขา'
);
187.
theform.select3.options[1]=
new
Option(
'ศิลปสาขา1'
,
'ศิลปสาขา1'
);
188.
theform.select3.options[2]=
new
Option(
'ศิลปสาขา2'
,
'ศิลปสาขา2'
);
189.
theform.select3.options[3]=
new
Option(
'ศิลปสาขา3'
,
'ศิลปสาขา3'
);
190.
theform.select3.options[4]=
new
Option(
'ศิลปสาขา4'
,
'ศิลปสาขา4'
);
191.
theform.select3.options[5]=
new
Option(
'ศิลปสาขา5'
,
'ศิลปสาขา5'
);
192.
193.
theform.select2=false;
194.
theform.select3=false;
195.
}
196.
break
;
197.
198.
199.
case
"busi"
:
200.
{
201.
theform.select2.options[0]=
new
Option(
'กรุณาเลือกภาควิชา'
,
'กรุณาเลือกภาควิชา'
);
202.
theform.select2.options[1]=
new
Option(
'BU1'
,
'BU1'
);
203.
theform.select2.options[2]=
new
Option(
'BU2'
,
'BU2'
);
204.
theform.select2.options[3]=
new
Option(
'BU3'
,
'BU3'
);
205.
theform.select2.options[4]=
new
Option(
'BU4'
,
'BU4'
);
206.
207.
theform.select3.options[0]=
new
Option(
'กรุณาเลือกสาขา'
,
'กรุณาเลือกสาขา'
);
208.
theform.select3.options[1]=
new
Option(
'BUสาขา1'
,
'BUสาขา1'
);
209.
theform.select3.options[2]=
new
Option(
'BUสาขา2'
,
'BUสาขา2'
);
210.
theform.select3.options[3]=
new
Option(
'BUสาขา3'
,
'BUสาขา3'
);
211.
theform.select3.options[4]=
new
Option(
'BUสาขา4'
,
'BUสาขา4'
);
212.
213.
theform.select2=false;
214.
theform.select3=false;
215.
}
216.
break
;
217.
218.
219.
case
"econo"
:
220.
{
221.
theform.select2.options[0]=
new
Option(
'กรุณาเลือกภาควิชา'
,
'กรุณาเลือกภาควิชา'
);
222.
theform.select2.options[1]=
new
Option(
'EC1'
,
'EC1'
);
223.
theform.select2.options[2]=
new
Option(
'EC2'
,
'EC2'
);
224.
theform.select2.options[3]=
new
Option(
'EC3'
,
'EC3'
);
225.
theform.select2.options[4]=
new
Option(
'EC4'
,
'EC4'
);
226.
theform.select2.options[5]=
new
Option(
'EC5'
,
'EC5'
);
227.
theform.select2.options[6]=
new
Option(
'EC6'
,
'EC6'
);
228.
theform.select2.options[7]=
new
Option(
'EC7'
,
'EC7'
);
229.
230.
theform.select3.options[0]=
new
Option(
'กรุณาเลือกสาขา'
,
'กรุณาเลือกสาขา'
);
231.
theform.select3.options[1]=
new
Option(
'ECสาขา1'
,
'ECสาขา1'
);
232.
theform.select3.options[2]=
new
Option(
'ECสาขา2'
,
'ECสาขา2'
);
233.
theform.select3.options[3]=
new
Option(
'ECสาขา3'
,
'ECสาขา3'
);
234.
theform.select3.options[4]=
new
Option(
'ECสาขา4'
,
'ECสาขา4'
);
235.
theform.select3.options[5]=
new
Option(
'ECสาขา5'
,
'ECสาขา5'
);
236.
theform.select3.options[6]=
new
Option(
'ECสาขา6'
,
'ECสาขา6'
);
237.
theform.select3.options[7]=
new
Option(
'ECสาขา7'
,
'ECสาขา7'
);
238.
theform.select3.options[8]=
new
Option(
'ECสาขา8'
,
'ECสาขา8'
);
239.
theform.select3.options[9]=
new
Option(
'ECสาขา9'
,
'ECสาขา9'
);
240.
241.
theform.select2=false;
242.
theform.select3=false;
243.
}
244.
break
;
245.
246.
}
247.
}
248.
249.
250.
</script>
251.
</p>
252.
</form>
253.
</body>
254.
</html>