Home >Web Front-end >JS Tutorial >How to delete input in javascript

How to delete input in javascript

藏色散人
藏色散人Original
2021-04-01 15:45:124515browse

Javascript method to delete input: 1. Delete input through "$(':input').remove();" method; 2. Through "$(':text').remove();" Ways to delete input and so on.

How to delete input in javascript

The operating environment of this tutorial: windows7 system, javascript version 1.8.5, Dell G3 computer.

Specific question:

How to delete input in jquery

<tr><td>{$vo.username}</td><td>{$vo.start}</td><td>{$vo.groupin}</td><td>
<tr><td>{$vo.username}</td><td>{$vo.start}</td><td>{$vo.groupin}</td><td><tr><td>{$vo.reg_time}</td><td>{$vo.login_time}</td><td id="closes"><input type="checkbox" value="{$vo.id}" name="box[]"/></td></tr>

How to delete the 73a3ca28445b1c625f2086a50cb8c7df tag, and this is a php loop only Being able to delete the first one without deleting the others

is actually deleting the first input

Implementation method:

javascript deletes input

$(&#39;:input&#39;).remove();
or
$(&#39;:text&#39;).remove();
or
$(&#39;input[type="text"]&#39;).remove();

【Recommended learning: js basic tutorial

The above is the detailed content of How to delete input in javascript. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn