JSFiddle - React, Tailwind, and code Playground
HTML
<form class="f-fix" action="">
<input name="id" value="" id="id" type="text" value=""/>
</form>
<div id="res"></div>
JavaScript
$('#res').append($('form').attr('id'))
<form class="f-fix" action="">
<input name="id" value="" id="id" type="text" value=""/>
</form>
<div id="res"></div>
$('#res').append($('form').attr('id'))