DOM setAttribute onClick [英] DOM setAttribute onClick
本文介绍了DOM setAttribute onClick的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个带有添加按钮的表单,点击后应创建一个带有编辑和删除按钮的新文本区域并将其附加到表单。编辑和删除按钮都需要响应onClick事件。这是我到目前为止的代码。
Hi,
I have a form with an add button that when clicked should create a new textarea with edit and delete buttons and append it to the form. Both the edit and delete buttons need to respond to onClick events. Here''s the code I have so far.
展开 | 选择 | Wrap | 行号
推荐答案
Heya, Sean。
尝试用引号封装函数调用:
Heya, Sean.
Try encapsulating the function call in quotes:
展开 | 选择 | Wrap | 行号
像魔术一样工作!!!!你是一个绝对的明星!!
Works like magic!!!! You are an absolute star!!
Heya,Sean。
尝试将函数调用封装在引号中:
Heya, Sean.
Try encapsulating the function call in quotes:
展开 | 选择 | Wrap | 行号
您好,
您对双引号的建议很有效。我现在唯一的问题是id -
Hi,
Your suggestion with the double quotes works great. The only problem I have now is that the id -
展开 | 选择 | Wrap | 行号
这篇关于DOM setAttribute onClick的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文