JSFiddle - React, Tailwind, and code Playground
HTML
<div id="mydiv"><input id="input1" readonly></div>
<br>
<br>
<div id="result">
</div>
CSS
body { background: black; }
.pass { color: green; }
.fail {color: red; }
JavaScript
if ( $("#mydiv").find("[readonly]").length ) {
$('#result').addClass('pass')
.text('$("#mydiv").find("[readonly]"): Pass');
} else {
$('#result').addClass('fail')
.text('$("#mydiv").find("[readonly]"): Fail');
}