<input type="text" id="f1" />
<input type="text" id="f2" />
<input type="text" id="f3" />
<input type="button" value="Check" onclick="pr();" />
<script type="text/javascript">
function pr()
{
var t = function (id) { return document.getElementById(id).value.length };
var x = t('f1'), y = t('f2'), z = t('f3');
alert(Math.max(x, y, z) < 21 && Math.min(x, y, z) > 5);
}
</script>
|