我通过创建html文件在本地运行引导日期和时间选择器,但是它没有工作,尽管它在JSFiddle (link:https://jsfiddle.net/fuu1v2t0/10/)中粘贴代码时运行得很好。
$(function() {
$('#datetimepicker2').datetimepicker({
language: 'en',
pick12HourFormat: true
});
});<div class="well">
<div id="datetimepicker2" class="input-append">
<input data-format="MM/dd/yyyy HH:mm:ss PP" type="text"></input>
<span class="add-on">
<i data-time-icon="icon-time" data-date-icon="icon-calendar">
</i>
</span>
</div>
</div> I included these files for the same. bootstrap.min.js, bootstrap-datetimepicker.min.js, bootstrap-combined.min.css, bootstrap-datetimepicker.min.css, bootstrap.css,
发布于 2016-06-13 14:23:36
请确保您也调用了jQuery文件。
"message": "Uncaught ReferenceError: $ is not defined", 可能意味着您没有在页面中调用jQuery库。
尝试将此脚本链接添加到标题中。https://code.jquery.com/jquery-3.0.0.min.js
https://stackoverflow.com/questions/37792172
复制相似问题