我无法将我的脚本转换为 jQuery。如何一次计算两个元素?
<script type="text/javascript">
function Compute(target, currentValue){
if(parseInt(currentValue.value) == 0 || parseInt(currentValue.value) > parseInt(target.value))
{
alert("That Value is not Valid");
}
}
</script>
<input type="text" id="frm1" name="frm1" onkeyup="Compute(document.getElementById('frm1a'), this);"/> <br>
<input type="hidden" id="frm1a" name="frm1a" value="90"/> <br>
<input type="text" id="frm2" name="frm2" onkeyup="Compute(document.getElementById('frm2a'), this);"/> <br>
<input type="hidden" id="frm2a" name="frm2a" value="50"/> <br>
<input type="text" id="frm3" name="frm3" onkeyup="Compute(document.getElementById('frm3a'), this);"/> <br>
<input type="hidden" id="frm3a" name="frm3a" value="10"/> <br>