如何从表单中删除实例 [英] How do I delete an instance from a form

查看:79
本文介绍了如何从表单中删除实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我正在研究一个J2EE项目,问题是我正在创建一个表单,我在第一个有3个阵营,用户必须从列表中选择一个人,我从我的数据库中提取第二个阵营是类似的唯一区别是用户选择的人不应出现在第二个列表中,最后在第一个和第二个阵营中选择的人不应出现在第三个阵营的列表中。我问过很多人他们建议我使用Jquery和javascript你知道我该怎么编码吗?

Hello, I am working on a J2EE project, the problem is I was creating a form where I have 3 camps in the first one the user have to choose a person in a list that i extract from my DB the second camp is similar the only difference is the person that the user choose shouldn't appear in the second list and finally both the person selected in the first and the second camps shouldn't appear in the list of the third camps. I asked many person they suggest me to use Jquery and javascript do you have any idea how do I code this?

推荐答案

从DOM中删除表单的实例,那是。你不必删除任何东西;删除的对象和资源通过垃圾回收回收。要删除元素,请使用以下方法:

Node.removeChild () - Web API | MDN [ ^ ]。



使用jQuery,您可以使用以下函数: DOM删除| jQuery API文档 [ ^ ]。

参见:操纵| jQuery API文档 [ ^ ]。



-SA
Remove the instance of a form from the DOM, that's is. You don't have to "delete" anything; the objects deleted and resources are reclaimed via garbage collection. To remove an element, use this method:
Node.removeChild() — Web APIs | MDN[^].

With jQuery, you can use these functions: DOM Removal | jQuery API Documentation[^].
See also: Manipulation | jQuery API Documentation[^].

—SA


这篇关于如何从表单中删除实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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