首先,我的主页面下面有js,如果我回发(f5),它在任何webform.aspx上100%没有错误:
<script src="../../Content/plugins/jQuery/jQuery-2.1.4.min.js" type="text/javascript"></script>
<!-- Bootstrap 3.3.2 JS -->
<script src="../../Scripts/bootstrap.min.js" type="text/javascript"></script>
<!-- Admin Custom Js by Hoang -->
<script src="../../Action/Admin/AdminRV.js" type="text/javascript"></script>
<script src="../../Content/js/app.min.js" type="text/javascript"></script>
<!-- FastClick -->
<script src="../../Content/plugins/fastclick/fastclick.min.js" type="text/javascript"></script>
<!-- SlimScroll 1.3.0 -->
<script src="../../Content/plugins/slimScroll/jquery.slimscroll.min.js" type="text/javascript"></script>
<script src="../../Content/js/docs.js" type="text/javascript"></script>
<script src="../../Action/Admin/SiteMap.js" type="text/javascript"></script>
但是,如果我使用reloadPage
,用户菜单下拉列表将不起作用,这有助于我重新加载下一页webform的主体并保持模板主体或contentHeader的安全。它只是重新加载我点击的那个webform的ContentPlaceHolder。
function reloadPage(id) {
var state = {
"thisIsOnPopState": true
};
var idPage = id;
var currentURL = $('a[id="' + idPage + '"]').attr('role');
history.pushState(state, null, currentURL);
$('body').load(currentURL);}
如何在重新加载页面时修复bootstrap.min.js中的事件点击下拉列表?