IE8没有在javascript中初始化函数属性。

时间:2011-10-04 19:14:48

标签: javascript jquery

我有以下javascript。这延伸了基思森林jquery日期选择器。在chrome中,如果以下警告日期值。然而,在ie 8我得到[对象,对象]

<script type="text/javascript"><!--
var defaultDate = '06/01/2011';

$(function() {


    $('#inlineDatepicker').calendarsPicker({onSelect: showDate, defaultDate: defaultDate, selectDefaultDate: true, changeMonth:false, onDate: nationalDays, prevText: '&nbsp;',  nextText: '&nbsp;'});

});


function nationalDays(date, inMonth) { 

    alert(date); // doesn't return date in ie 8
}


function showDate(date) {   
    var start = date.toString('dd-MM-yyyy');
    var url = '/events?s=' + start;
    window.location = url;
}

--></script>

0 个答案:

没有答案