JSFiddle - React, Tailwind, and code Playground
HTML
<div id="content">
<input type="text" id="text1"/>
<input type="text" id="text2"/>
<input type="text" id="text3"/>
<input type="text" id="text4"/>
<input type="text" id="text5"/>
<button onclick="checker();" >Check</button>
</div>
JavaScript
function checker(){
var textboxes = $('[id^=text]');
var emptytextboxes = textboxes.filter(function(){
return this.value == "";
});
if(textboxes.length == emptytextboxes.length){
alert('atleast one of the field should be filled');
}
}