Calendarextender函数不适用于jquery clone [英] Calendarextender function is not working with jquery clone
本文介绍了Calendarextender函数不适用于jquery clone的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
这里我的问题是,ajax calendarExtender无法在Jquery克隆中工作,在父类日历工作正常,当我克隆它时文本框不显示日历扩展器
i不知道该怎么做...请帮助我
我的Javascript代码
$( function (){
$(' #Button1')。点击( function (){
< span class =code-keyword> var hfAnswers = $(' #<%= HFeducationdetails。 ClientID%>');
var answers = parseInt (hfAnswers。 val())+ 1 ;
alert(answers);
hfAnswers.val(answers);
$(' 。sourceEdu:first')。clone()。attr({name: ans_clone _ + answers,id: ans_clone _ + answers})。appendTo(' .egignEdu'< /跨度>);
// $('。sourceEdu:first')。clone()。attr('id', 'choices_'+ $(this).index())。insertAfter('。designationEdu');
})
})
我的Asp.net代码是
< asp:TextBox ID = txtfrom3_1 runat = server class = 表单控件 占位符 = 来自 > < ; / asp:TextBox >
< asp:CalendarExtender ID = CalendarExtender4 runat = server TargetControlID = txtfrom3_1 格式 = dd / MM / yyyy PopupPosition = TopLeft > < / asp:CalendarExtender >
我尝试了什么:
i尝试了js脚本,但我不知道怎么做这个nu ...
感谢
解决方案
( function (){
(' #Button1')。click( function (){
var hfAnswers =
( #<%= HFeducationdetails.ClientID%>');
var answers = parseInt (hfAnswers.val())+ 1 跨度>;
alert(answers);
hfAnswers.val(answers);
Hi All
Here my problem is , ajax calendarExtender not working in Jquery clone , in parent class calendar working fine when i clone it that the text box not displaying the calendar Extender
i dont know what to do ... pls help me
my Javascript code
$(function() {
$('#Button1').click(function() {
var hfAnswers = $('#<%=HFeducationdetails.ClientID %>');
var answers = parseInt(hfAnswers.val()) + 1;
alert(answers);
hfAnswers.val(answers);
$('.sourceEdu:first').clone().attr({ name: "ans_clone_" + answers, id: "ans_clone_" + answers }).appendTo('.designationEdu');
//$('.sourceEdu:first').clone().attr('id', 'choices_' + $(this).index()).insertAfter('.designationEdu');
})
})
My Asp.net Code is
<asp:TextBox ID="txtfrom3_1" runat="server" class="form-control" placeholder="From"></asp:TextBox>
<asp:CalendarExtender ID="CalendarExtender4" runat="server" TargetControlID="txtfrom3_1" Format="dd/MM/yyyy" PopupPosition="TopLeft"></asp:CalendarExtender>
What I have tried:
i tried the chaging the js script but i dont know how to do this nu ...
thank
解决方案
(function() {
('#Button1').click(function() { var hfAnswers =
('#<%=HFeducationdetails.ClientID %>'); var answers = parseInt(hfAnswers.val()) + 1; alert(answers); hfAnswers.val(answers);
这篇关于Calendarextender函数不适用于jquery clone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文