【发布时间】:2016-09-20 05:56:40
【问题描述】:
我在 asp.net C# 中使用 Master 和 Content 页面。在我的 web 应用程序中,我正在使用引导程序。我收到错误 Uncaught TypeError: $(...).datepicker is not a function
如果我尝试解决上述错误,母版页中的下拉菜单会产生错误,因为 Uncaught TypeError: $(...).dropdown is not a function
Uncaught TypeError: $(...).datepicker is not a function
(anonymous function) @ com_mst_CompanyRegistrationAdd.aspx:111
i @ jquery.min.js:2
fireWith @ jquery.min.js:2
ready @ jquery.min.js:2
K @ jquery.min.js:2
在母版页中:
<script src="../Scripts/jquery-1.12.4.js"></script>
<script src="../Scripts/jquery-1.12.4.min.js"></script>
<script src="../Scripts/bootstrap.js"></script>
<script src="../Scripts/bootstrap.min.js"></script>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<script>
$(document).ready(function() {
$('dropdown-toggle').dropdown()
});
</script>
在内容页面中:
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript">
$(function () {
$("#txtEstablishedDate").datepicker({
dateFormat: "dd/mm/yy",
changeMonth: true,
changeYear: true,
});
});
</script>
<script type="text/javascript">
$(function () {
$("#txtRCDate").datepicker({
dateFormat: "dd/mm/yy",
changeMonth: true,
changeYear: true
});
});
</script>
<script type="text/javascript">
$(function () {
$("#txtCstDate").datepicker({
dateFormat: "dd/mm/yy",
changeMonth: true,
changeYear: true
});
});
</script>
请帮我解决错误..
【问题讨论】:
标签: jquery twitter-bootstrap-3