JSFiddle - React, Tailwind, and code Playground

by Gabriele Petrioli

HTML

Has attribute value with 123: <input type="text" value="123" />
<hr />
Has empty value attribute, enter 123 manually: <input type="text" />
<hr/>
<button id="attr">remove using attribute</button>
<button id="val">remove using the actual value</button>

JavaScript

$('#attr').click(function(){
    $(':input[value="123"]').remove();
});

$('#val').click(function(){
    $(':input').filter(function(){return this.value=='123'}).remove();
});