01.
<script language=
"javascript"
>
02.
<!--
03.
function
chkin(){
04.
if
(document.frm1.up.value==
"upload"
){
05.
alert(
"ต้องเลือกข้อมูลก่อนนะครับ"
);
06.
document.frm1.up.focus();
07.
return
false;
08.
}
09.
}
10.
</SCRIPT>
11.
12.
</head>
13.
<body>
14.
<form action=
"#"
method=
"post"
name=
"frm1"
onsubmit=
"return chkin()"
>
15.
<select name=
"up"
size=
"1"
>
16.
<option value=
"mp3"
>Mp3</option>
17.
<option value=
"pic"
>Picture</option>
18.
<option selected value=
"upload"
>เลือกหมวดที่ต้องการ</option>
19.
</select>
20.
<input name=
"submit"
type=
"submit"
value=
"Upload"
/>
21.
22.
</form>
23.
</body>
24.
</html>