我使用具有多个输入字段的输入形式。添加删除链接/按钮删除输入字段的内容?
这些输入字段可以预先填充,所以我想给用户提供了一个“删除”链接或按钮,删除该输入字段的全部内容字段旁边,然后删除的一个容易的选择。
按下删除键也会给他们,这已经被删除的文本确认。
我重视的是什么我想
我使用WordPress和重力形式我的表单生成器做一个JPEG。我想可能有一个jQuery解决方案来做到这一点,但不知道如何?
我的输入字段之一的代码如下,我的表单中的inout字段都是相同的代码,但不同的id当然,所以我不想在这里粘贴一切只是作为一个exmpale。
<li id="field_15_144" class="gfield">
<label class="gfield_label" for="input_15_144">List</label>
<div class="ginput_container">
<input id="input_15_144" class="medium" type="text" tabindex="40" value="" name="input_144">
</div>
// this would be the link to delete the contents of input field "input_15_144
<a href="" class="deleteURL">Delete</a>
</li>
感谢您的帮助!
发布您的代码你已经尝试到现在 – Techie
http://stackoverflow.com/a/5344752/976777 –
@Dasun - 是啊对不起,我忘了补充吧,现在做... – Redwall