动态div中的jQuery日期选择器
我有一个包含字段集的表单,并且能够添加一个新的部分(以前字段集的克隆)。我可以为原始字段选择日期,但当我添加新的部分时,datepicker函数不会生成 这里列出了我的代码和示例->动态div中的jQuery日期选择器,jquery,html,datepicker,Jquery,Html,Datepicker,我有一个包含字段集的表单,并且能够添加一个新的部分(以前字段集的克隆)。我可以为原始字段选择日期,但当我添加新的部分时,datepicker函数不会生成 这里列出了我的代码和示例-> 谢谢。这是因为您必须对新添加的元素调用datepicker()函数 document.getElementById("placeholder").appendChild(newFieldSet); $('input.date', newFieldSet).datepicker(); window.lastC
谢谢。这是因为您必须对新添加的元素调用
datepicker()
函数
document.getElementById("placeholder").appendChild(newFieldSet);
$('input.date', newFieldSet).datepicker();
window.lastClone = newFieldSet.id;
这取决于我使用的浏览器吗?@PlatiNUM不,这不应该取决于浏览器,对我来说,它在firefox和chromeOk中都能工作。IE出现了一些问题,但现在它起作用了。谢谢