datepicker can be executed at $(document). Ready but error is reported in window.onload ()
Uncaught TypeError: $(.). Datepicker is not a function
related codes
< script type= "text/javascript" >
$(document) .ready (function () {
alert ("document");
$("- sharpdate"). Datepicker ({
yearRange: "-70:+0"
});
});
window.onload= function () {
alert ("window")
$("- sharpdate"). Datepicker ({
yearRange: "-70:+0"
});
}
< / script >