我在 jQuery easyui datebox 上使用这个脚本
<script>
function onSelect(date){
$('#result').text(date)
}
</script>
输出是
Selected Date: Tue Jun 11 2013 00:00:00 GMT+0800 (China Standard Time)
那么,是否可以进行输出:
2013-06-11
怎么做?
因为我想将值 datebox 事件传递给查询 mysql
获取数据.php
<?php
include 'db.php';
$created = isset($_POST['text']) ? mysql_real_escape_string($_POST['text']) : '';
$where = "datetime LIKE '$created%'";
$rs = mysql_query("select * from fe1a where " . $where );
$result = array();
while($row = mysql_fetch_object($rs)){
array_push($array, $row);
}
echo json_encode($result);
?>