克隆元素但文本输入为空值 [英] Cloning an element but text input with empty value

查看:62
本文介绍了克隆元素但文本输入为空值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何clonenode例如div标签,其中有一个文本输入字段和两个选项标签,以使新的克隆输入字段具有空值?谢谢。

how do i clonenode for example an div tag where are one text input field and two option tags to make that new cloned input field with an empty value? Thank you.

推荐答案

我建​​议使用 cloneNode()方法并在克隆操作后删除不需要的属性...


亲切的问候
i would suggest to use the cloneNode() method and remove the unwanted attributes after the clone-operation ...

kind regards


我尝试了一些但没有工作


这是我的功能
i tried some things but none works

this is my function
展开 | 选择 | 换行 | 行号


你的克隆节点是怎样的?
how does your cloned node look like?


这篇关于克隆元素但文本输入为空值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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