JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="name">
<button class="dedi">click</button>
JavaScript
var len = $("#name");
$(".dedi").click(function(){
alert (len.length)
})
<input type="text" id="name">
<button class="dedi">click</button>
var len = $("#name");
$(".dedi").click(function(){
alert (len.length)
})