JSFiddle - React, Tailwind, and code Playground

by Paulpro

HTML

<form id="newform">
    <textarea>Test</textarea>
    <label><input type="radio"></label>
    <textarea>Test</textarea>
</form>

JavaScript

var $test= $('#newform').find('input,label,textarea');
 
    if ($test.length != 0) {
        $test.each(function(){
            var type = this.type? this.type : this.nodeName;
            console.log(type);
        });
    }