JSFiddle - React, Tailwind, and code Playground

by hemant1027

HTML

marrital status: <select id="a" onchange="if( this.options[this.selectedIndex].value=='s')
{document.getElementById('spouce').readOnly = true;}
">
    <option value='s'>single</option>
    <option value='m'>married</option>
</select>
<br>spouce : <input type='text' id='spouce'/>