如何创建下拉列表克隆 [英] how to create dropdownlist clone

查看:77
本文介绍了如何创建下拉列表克隆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是创建克隆的代码....
问题是创建克隆后如何获取克隆下拉列表的值


This is the code that creating clone....
the issue is that after creating clone how to get the value of clone dropdown


$(''#AddAttr'').click(function () {
           $(''#TemplateRow'').clone().attr({
            //  id: ''newpid'' // paragraph''s ID
               // next, we alter the input inside it (change ID, clear value).
           }).find(''#ddlProfessionalTitle'').attr({
               // value: '''',
               //selected: ''selected'',
               id: ''newid'' // <input>''s ID
               // call end to stop the ".find", then add it to the #def element
           }).end().append(''<div id="divRemove" style="float:right;color:blue;removed:pointer;" önclick="Remove(this)">Remove</div>'').appendTo(''#def'');
           //   $(''#abc'').show();
           //   $(''#AddAttr'').hide();
           return false;

       });

推荐答案

(''#AddAttr'').click(function(){
(''#AddAttr'').click(function () {


(''# TemplateRow'').clone().attr({ //id:``newpid''//段落的ID //接下来,我们更改其中的输入(更改ID,清除值). }).find(''#ddlProfessionalTitle'').attr({ //价值: '''', //selected:已选择", id:``newid''//< input>的ID //调用end停止".find",然后将其添加到#def元素中 }).end().append(''< div id ="divRemove" style ="float:right; color:blue; removed:pointer;"önclick="Remove(this)"> Remove</div> '').appendTo(''#def''); //
(''#TemplateRow'').clone().attr({ // id: ''newpid'' // paragraph''s ID // next, we alter the input inside it (change ID, clear value). }).find(''#ddlProfessionalTitle'').attr({ // value: '''', //selected: ''selected'', id: ''newid'' // <input>''s ID // call end to stop the ".find", then add it to the #def element }).end().append(''<div id="divRemove" style="float:right;color:blue;removed:pointer;" önclick="Remove(this)">Remove</div>'').appendTo(''#def''); //


(''#abc'').show(); //
(''#abc'').show(); //


这篇关于如何创建下拉列表克隆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆