PHPの最小数と最大数の間にあるかどうかを検証するJavaScript関数を作成する方法は?
$dbosminsalary
$dbosmaxsalary
$dblastdate
<form action='workaction.php' method='post'>
<input type='number' id='amntpreferred' name='amntpreferred' class='required input_field' placeholder='Enter bid value' oninput='numberBetween();' required/>
<script>
function numberBetween(amntpreferred, $dbosmaxsalary, $dbosminsalary)
{
if(amntpreferred <= $dbosminsalary)
return false;
else if(amntpreferred >= $dbosmaxsalary)
return false;
else
return true;
}
if (numberBetween(amntpreferred,$dbosmaxsalary,$dbosminsalary))
{
echo 'The value is in the range!';
}
else
{
echo 'The value is outside the range!';
}
</script>