 |
สงสัยในการเปลี่ยน input type......ผมจะเปลี่ยนให้ใส่เป็นวันที่อ่ะคับ DATE จะต้องเปลี่ยนโดยใช้คำสั่งแบบไหนเหรอคับ |
|
 |
|
|
 |
 |
|
Code (JavaScript)
<script>
// Column names must be identical to the actual column names in the database, if you dont want to reveal the column names, you can map them with the different names at the server side.
var columns = new Array("fname","lname");
var placeholder = new Array("วัน/เดือน/ปี","จำนวนเงิน","");
var inputType = new Array("text","text");
var table = "tableDemo";
var selectOpt = new Array("100","90","80","70","60","50","40","30","20","10","0");;
// Set button class names
var savebutton = "ajaxSave";
var deletebutton = "ajaxDelete";
var editbutton = "ajaxEdit";
var updatebutton = "ajaxUpdate";
var cancelbutton = "cancel";
var saveImage = "images/save.png"
var editImage = "images/edit.png"
var deleteImage = "images/remove.png"
var cancelImage = "images/back.png"
var updateImage = "images/save.png"
// Set highlight animation delay (higher the value longer will be the animation)
var saveAnimationDelay = 3000;
var deleteAnimationDelay = 1000;
// 2 effects available available 1) slide 2) flash
var effect = "flash";
</script>
ผมจะเปลี่ยนให้ใส่เป็นวันที่อ่ะคับ DATE จะต้องเปลี่ยนโดยใช้คำสั่งแบบไหนเหรอคับ
Tag : PHP, JavaScript
|
|
 |
 |
 |
 |
Date :
2015-02-06 11:54:39 |
By :
stepartz |
View :
851 |
Reply :
5 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|

แบบนี้อ่ะคับ
|
 |
 |
 |
 |
Date :
2015-02-06 12:09:49 |
By :
stepartz |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ก็เอา Date Picker ไปใส่ในช่องวันเดือนปี ก็ได้แล้วนะครับ
แต่ถ้าเป็น html5 แล้ว input type="date" ก็พอช่วยได้ครับ
|
 |
 |
 |
 |
Date :
2015-02-06 13:34:48 |
By :
apisitp |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (PHP)
<table border="0" class="tableDemo bordered">
<tr class="ajaxTitle">
<th width="14%">ลำดีบที่</th>
<th width="16%">วัน/เดือน/ปี</th>
<th width="16%">จำนวนเงิน</th>
<th width="10%">Action</th>
</tr>
<?php
require_once("ajax_table.class.php");
$obj = new ajax_table();
$records = $obj->getRecords();
//echo phpinfo();
?>
<?php
if(count($records)){
$i = 1;
$eachRecord= 0;
foreach($records as $key=>$eachRecord){
?>
<tr id="<?=$eachRecord['id'];?>">
<td><?=$i++;?></td>
<td class="fname"><?=$eachRecord['fname'];?></td>
<td class="lname"><?=$eachRecord['lname'];?></td>
<td>
<a href="javascript:;" id="<?=$eachRecord['id'];?>" class="ajaxEdit"><img src="" class="eimage"></a>
<a href="javascript:;" id="<?=$eachRecord['id'];?>" class="ajaxDelete"><img src="" class="dimage"></a>
</td>
</tr>
<?php }
}
?>
</table>
อันนี้เป็น table ที่เอาไว้บันทึกอ่ะคับ

ช่องที่เอาไว้กรอก มันจะดึงจาก Code (JavaScript)
<script>
// Column names must be identical to the actual column names in the database, if you dont want to reveal the column names, you can map them with the different names at the server side.
var columns = new Array("fname","lname");
var placeholder = new Array("วัน/เดือน/ปี","จำนวนเงิน","");
var inputType = new Array("text","text");
var table = "tableDemo";
var selectOpt = new Array("100","90","80","70","60","50","40","30","20","10","0");;
// Set button class names
var savebutton = "ajaxSave";
var deletebutton = "ajaxDelete";
var editbutton = "ajaxEdit";
var updatebutton = "ajaxUpdate";
var cancelbutton = "cancel";
var saveImage = "images/save.png"
var editImage = "images/edit.png"
var deleteImage = "images/remove.png"
var cancelImage = "images/back.png"
var updateImage = "images/save.png"
// Set highlight animation delay (higher the value longer will be the animation)
var saveAnimationDelay = 3000;
var deleteAnimationDelay = 1000;
// 2 effects available available 1) slide 2) flash
var effect = "flash";
</script>
|
ประวัติการแก้ไข 2015-02-06 14:45:26 2015-02-06 14:46:05 2015-02-06 14:47:20
 |
 |
 |
 |
Date :
2015-02-06 14:44:27 |
By :
stepartz |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|