js代码中日期能输出 但是不知道怎么获取<script src="http://www1.cndv.tv/js/jscal2.js"></script> <script type="text/javascript">//<![CDATA[
var SELECTED_RANGE = null;
function getSelectionHandler() {
var startDate = null;
var ignoreEvent = false;
return function(cal) {
var selectionObject = cal.selection;
if (ignoreEvent)
return; var selectedDate = selectionObject.get();
if (startDate == null) {
startDate = selectedDate;
SELECTED_RANGE = null;
document.getElementById("info").innerHTML = "点击选择结束日期";
cal.args.min = Calendar.intToDate(selectedDate);
cal.refresh();
} else {
ignoreEvent = true;
selectionObject.selectRange(startDate, selectedDate);
ignoreEvent = false;
SELECTED_RANGE = selectionObject.sel[0];
startDate = null;
document.getElementById("info").innerHTML = selectionObject.print("%Y-%m-%d");
cal.args.min = null;
cal.refresh();
};
};
}; Calendar.setup({
cont : "cont",
fdow : 1,
selectionType : Calendar.SEL_SINGLE,
onSelect : getSelectionHandler()
});
//]]></script><!--日历调用结束-->
其他一切都正常 可以把两个时间都输出出来,但是 怎么获取他那 我用的php 希望高手 指点 下
var SELECTED_RANGE = null;
function getSelectionHandler() {
var startDate = null;
var ignoreEvent = false;
return function(cal) {
var selectionObject = cal.selection;
if (ignoreEvent)
return; var selectedDate = selectionObject.get();
if (startDate == null) {
startDate = selectedDate;
SELECTED_RANGE = null;
document.getElementById("info").innerHTML = "点击选择结束日期";
cal.args.min = Calendar.intToDate(selectedDate);
cal.refresh();
} else {
ignoreEvent = true;
selectionObject.selectRange(startDate, selectedDate);
ignoreEvent = false;
SELECTED_RANGE = selectionObject.sel[0];
startDate = null;
document.getElementById("info").innerHTML = selectionObject.print("%Y-%m-%d");
cal.args.min = null;
cal.refresh();
};
};
}; Calendar.setup({
cont : "cont",
fdow : 1,
selectionType : Calendar.SEL_SINGLE,
onSelect : getSelectionHandler()
});
//]]></script><!--日历调用结束-->
其他一切都正常 可以把两个时间都输出出来,但是 怎么获取他那 我用的php 希望高手 指点 下
这一句 就是把日器输出了出来,但是 怎么获取那
alert(a);
......无语了