|
 |
|
เกี่ยว date picker ช่วยหน่อยนะคะ คือ ใช้ date picker แล้วเลือกวัน ก็จะได้วันมาไว้ใน textbox 1 |
|
 |
|
|
 |
 |
|
ลองเอาไปปรับแก้ดูครับ
<script>
var nrun_chk;
var day_th=new Array("อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัส","ศุกร์","เสาร์");
function chk_date(){
txt_day_of_week=""
frm=document.form1;
if(frm.date1.value!=""){
tmp_arr=frm.date1.value.split("-");
if(tmp_arr.length==3 && tmp_arr[2]!=""){
tmp_date=new Date(tmp_arr[0],parseInt(tmp_arr[1])-1,tmp_arr[2]);
day_of_week=tmp_date.getDay();
txt_day_of_week=day_th[day_of_week];
}
}
frm.date2.value=txt_day_of_week;
nrun_chk=setTimeout("chk_date()",500);
}
</script>
<body onload="chk_date()">
<form method=post action="" name="form1">
<input type="text" name="date1"><input type="text" name="date2">
</form>
</body>
|
 |
 |
 |
 |
Date :
2010-01-26 20:59:26 |
By :
ผ่านมา |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 00
|