JSFiddle - React, Tailwind, and code Playground

HTML

<div class="form">
<input type="text" name="name666" placeholder="test">
</div>

JavaScript

$('.form').find('input:text').each(function() {
   $("<input type='tel' />").attr({ name: this.name, value: this.value }).insertBefore(this);
}).remove();