に位置している必要なコンポーネントを持っている場合
を参照してください。私たちは必要な結果を得ることができます。正しい次のCDNのURLを試してください:
<html>
<body>
<label>Enter the license active date</label>
<input type="text" id="datepicker" /><br>
<script src="https://code.jquery.com/jquery-1.9.1.js"></script>
<!-- Load jQuery UI Main JS -->
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<!-- Load SCRIPT.JS which will create datepicker for input field -->
<script src="JS/script.js"></script>
</body>
</html>
とscript.jsが
$(document).ready(
/* This is the function that will get executed after the DOM is fully loaded */
function() {
$("#datepicker").datepicker({
changeMonth: true,//this option for allowing user to select month
changeYear: true //this option for allowing user to select from year range
});
}
);
はそれがために働くことを願っていますファイル:
<script src="https://code.jquery.com/jquery-1.9.1.js"></script>
<!-- Load jQuery UI Main JS -->
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
全体のコードはその HTMLページのようになります君は。
Jqueryが正常に読み込まれましたか? –
'datepicker'プラグインへの参照を保持しましたか? –
jQueryがロードされていることを確認して関数にコメントしてください。 –