开发者

Using jQuery:remove() to delete/remove form elements off a page

I'm trying to remove a form element generated through Ajax calls, but when I submit the form and var_dump the POST request, I can still see the form field key=>value. I need t开发者_开发百科o be able to completely remove the field through jQuery in order to validate correctly.


You can remove the element first before submitting it.

$(this.element).remove();


You can also not set the name attribute, and the field won't get posted

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜