|
 |
|
ต้องการเขียน List/menu ให้ติดต่อกับ List/Menu ด้วยกัน |
|
 |
|
|
 |
 |
|
เขียนเป็น java script นะคะเอาตัวอย่างนี้ไป run ดูจะ ถ้าไม่รู้ก็ mail มาถามได้ที่ [email protected]
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script>
function addoption(obj,ref,txt) {
opt=document.createElement("option");
opt.value=ref;
opt.text=txt;
obj.add(opt);
}
function change() {
var_text0=document.getElementsByName("text")[0].value;
while(document.getElementsByName("text")[1].length!=0) {
document.getElementsByName("text")[1].remove(0);
}
if(var_text0=="1") {
addoption(document.getElementsByName("text")[1],"","");
addoption(document.getElementsByName("text")[1],"Mr","Mr");
}
if(var_text0=="2") {
addoption(document.getElementsByName("text")[1],"","");
addoption(document.getElementsByName("text")[1],"Mrs","Mrs");
}
if(var_text0=="3") {
addoption(document.getElementsByName("text")[1],"","");
addoption(document.getElementsByName("text")[1],"Miss","Miss");
}
}
</script>
</head>
<body>
<form name="form1" method="post" action="">
<p>test 1
<select name="text" onchange="change()">
<option></option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</p>
<p>test 2
<select name="text">
<option></option>
<option value="Mr">Mr</option>
<option value="Mrs">Mrs</option>
<option value="Miss">Miss</option>
</select>
</p>
</form>
</body>
</html>
|
 |
 |
 |
 |
Date :
30 ก.ย. 2549 16:00:48 |
By :
katae |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 00
|