日期:2014-05-16  浏览次数:20662 次

Uncaught TypeError: Object #<Object> has no method 'datepicker'
Java code
 <script type="text/javascript" src="/Doctor/js/jquery-1.5.1.min.js"></script>
        <script type="text/javascript" src="/Doctor/js/jquery-ui-1.8.14.custom.min.js"></script>
        <script type="text/javascript" src="/Doctor/development-bundle/ui/jquery.ui.core.js"></script>
        <script type="text/javascript" src="/Doctor/development-bundle/ui/jquery.ui.widget.js"></script>
        <script type="text/javascript" src="/Doctor/development-bundle/ui/jquery.ui.datepicker.js"></script>
        <link rel="stylesheet" type="text/css" href="/Doctor/css\ui-lightness\jquery-ui-1.8.14.custom.css"/>


Java code
<b>Date: <input type="text" id="datepicker" name="datepicker"></b>


Java code

<script type="text/javascript">
    $(document).ready(function() {
    $(function() {
        $( "#datepicker" ).datepicker({dateFormat: 'yy-mm-dd',
            maxDate: '+1m',
            minDate: 'Now',
            beforeShowDay: noSundays
        });
    });
});
function noSundays(a) {   a=a.getDay();   return[a>0&&a<7,""]; }
    </script>



Uncaught TypeError: Object #<Object> has no method 'datepicker'
(anonymous function)Booking1.jsp:294
jQuery.fn.extend.readyjquery.min.js:27
jQuery.extend.ready.jQuery.readyListjquery.min.js:27
jQuery.extend.eachjquery.min.js:21
jQuery.extend.ready 
不知什麼事情?原本是用到,不過近日就用不到,真奇怪


------解决方案--------------------
错误提示明显是缺少method 'datepicker'