我想在struts中使用jquery datepicker插件。任何人都可以在这方面帮助我 我有日期选择器的 id,但我想使用名称或 struts 等效项进行填充 我想使用 id 的名称 intsead 进行填充。请在这方面帮助我
<input name="ADate" id="datepicker" type="text" class="txtBox">
<script>
$(function() {
$( "#datepicker" ).datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'yy-mm-dd',
});
});
</script>
最佳答案
尝试:
$(document).ready(function() {
$( "input[name='ADate']" ).datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'yy-mm-dd'
});
});
你的意思是这样吗
关于jquery - 在 struts 应用程序中使用带有名称而不是 id 的 jQuery 日期选择器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10425639/