0
我需要使用使用Bootstrap的datepicker和jQuery对话框功能。要做到这一点,我用这些链接:同时使用datepicker和jQuery对话框功能
<link rel="stylesheet" href="resources/bootstrap.3.3.7/css/bootstrap.min.css"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="resources/bootstrap.3.3.7/js/bootstrap.min.js"></script>
<link href="resources/css/font-awesome-4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="resources/jquery_ui/jquery-ui.min.js"></script>
<link href="resources/css/tables.css" rel="stylesheet" type="text/css" />
<link href="resources/css/buttons.css" rel="stylesheet" type="text/css" />
<link href="resources/css/forms.css" rel="stylesheet" type="text/css" />
<link href="resources/css/style.css" rel="stylesheet" type="text/css" />
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<!-- for the date -->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.3.0/css/datepicker.min.css" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.3.0/css/datepicker3.min.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.3.0/js/bootstrap-datepicker.min.js"></script>
在JSP主体:
$(function(){
dialog_info = $("#dialog").dialog({
autoOpen: false,
resizable: false,
height: "auto",
width: 300,
modal: true
});
});
<div id="dialog" title="Caricamento pagina">
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:12px 12px 20px 0;"></span><span id="warn_message"></span></p>
</div>
我不能达到的结果使“Caricamento pagina”的对话框,使所以它隐藏在开始并显示它,因为$(function)
中的代码不起作用。我也试过:
$(document).ready(function() {
dialog_info = $("#dialog").dialog({
autoOpen: false,
resizable: false,
height: "auto",
width: 300,
modal: true
});
}
)
(应该是相同的),没有结果。也许在上面的链接中存在兼容性问题?考虑到,在另一页,在不需要日期选择器,代码工作与这些链接:
<link rel='stylesheet' href='webjars/bootstrap/3.2.0/css/bootstrap.min.css'>
<script type="text/javascript" src="webjars/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript" src="webjars/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<link href="resources/css/tables.css" rel="stylesheet" type="text/css" />
<link href="resources/css/buttons.css" rel="stylesheet" type="text/css" />
<link href="resources/css/forms.css" rel="stylesheet" type="text/css" />
<link href="resources/css/style.css" rel="stylesheet" type="text/css" />
<link href="resources/css/font-awesome-4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="resources/jquery_ui/jquery-ui.min.js"></script>
但在第一页,我需要这么日期选择器显示的链接以上是必要的。请帮忙。提前致谢。
你在第一个代码块中两次调用jQuery – disinfor
固定格式和拼写问题 – DiskJunky