总是可以看到jQuery UI DatePicker [英] Always visible jQuery UI DatePicker
本文介绍了总是可以看到jQuery UI DatePicker的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
很简单,我可以使用jQuery UI来显示一个永远可见的日期标记窗口小部件。保留您的jQuery代码,但将其分配给< div>
而不是输入框。
日期:
< div id =datepicker>< / div>
< script>
$(function(){
$(#datepicker)。datepicker();
});
< / script>
功能范例住在 jQuery UI网页的datepicker小部件,我还包括一个。
$(function(){$(#datepicker)。datepicker();});
/ pre>< script src =https://ajax.googleapis.com/ajax/libs/ jquery / 1.11.1 / jquery.min.js>< / script>< link rel =stylesheethref =https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/ themes / smoothness / jquery-ui.css>< script src =https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js>< / script>< div id =datepicker>< / div>
How can I use jQuery UI to display an always-visible datepicker widget?
解决方案
It's simple. Keep your jQuery code, but assign it to a <div>
instead of an input box.
Date:
<div id="datepicker"></div>
<script>
$(function() {
$("#datepicker").datepicker();
});
</script>
A functional example lives at the jQuery UI webpage for the datepicker widget, and I've also included one below.
$(function() {
$("#datepicker").datepicker();
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<div id="datepicker"></div>
这篇关于总是可以看到jQuery UI DatePicker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文