[英]conflicting master and content page while using bootstrap
我在asp.net C#中使用“母版和内容”页面。
如果我尝试解决上述错误,则母版页中的下拉列表会产生错误,因为Uncaught TypeError:$(...)。dropdown不是一个函数
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 UI小部件。 您需要粘贴以下脚本并在下面链接网址。
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
这将解决问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.