Home > Web Front-end > JS Tutorial > body text

How to delete input in javascript

藏色散人
Release: 2023-01-04 09:33:55
Original
4477 people have browsed it

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>
Copy after login

How to delete the 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();
Copy after login

【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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template