<input type="text" name="num" onblur="test()"/> <script> function test(){ var text=document.getElementById("num").value; text=parseInt(text); if(!(text<90&&text>16)) alert("please enter a right number again..."); } </script>
</script> <input type="text" id="num" onmouseout="test()"/> <script> function test(){ var text=document.getElementById("num").value; console.log(text); text=parseInt(text); console.log(text==45); if(!(text<90&&text>16)) alert("please enter a right number again..."); else return; } </script>不好意思,刚不小心写成了id,现在改过来了
</script> <input type="text" id="num" onmouseout="test()"/> <script> function test(){ var text=document.getElementById("num").value; text=parseInt(text); if(!(text<90&&text>16)) alert("please enter a right number again..."); else return; } </script>
<script>
function test(){
var text=document.getElementById("num").value;
text=parseInt(text);
if(!(text<90&&text>16)) alert("please enter a right number again...");
}
</script>
<input type="text" id="num" onmouseout="test()"/>
<script>
function test(){
var text=document.getElementById("num").value;
console.log(text);
text=parseInt(text);
console.log(text==45);
if(!(text<90&&text>16)) alert("please enter a right number again...");
else return;
}
</script>不好意思,刚不小心写成了id,现在改过来了
</script>
<input type="text" id="num" onmouseout="test()"/>
<script>
function test(){
var text=document.getElementById("num").value;
text=parseInt(text);
if(!(text<90&&text>16)) alert("please enter a right number again...");
else return;
}
</script>
还有一个问题..你给我写的那个代码...if(!(text<=90&&text>=16)) 这个部分...在网页能用..可是就不能通过xhtml1.0验证 如果把<>和&& 换成全角的话就能通过..可是在网页里不能用..这是什么情况?