js :check 檢查
DropDownList是否選定的判定:
if (Form1.DropDownList1.selectedIndex==(parseInt("0"))){?
?alert("12555");
? return false;}
checkbox是否選定的判定:
if (document.Form1.RadioButton1.checked==false) {
?? alert('請選定復判結果!');
? return false;}
js比較文本框數據大小:
??var getqty =parseInt(document.Form1.TextBox11.value);
var failqty =parseInt(document.Form1.TextBox12.value);
var samqty =parseInt(document.Form1.TextBox13.value);
var fineqty =parseInt(document.Form1.TextBox14.value);
if (getqty<(parseInt("0"))){
?alert('批量不得小於0!');
? document.Form1.TextBox11.focus();
? return false;
?}
if (failqty>getqty){
?alert('不良數不得大於批量!');
? document.Form1.TextBox12.focus();
? return false;
?}
if ((fineqty+failqty)>getqty){
?alert('不良數與良品數之和不得大於批量!');
? document.Form1.TextBox12.focus();
? return false;
?}
轉載于:https://www.cnblogs.com/Nina-piaoye/archive/2006/07/13/450093.html
總結
以上是生活随笔為你收集整理的js :check 檢查的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 无人机如何通过GB28181协议接入视频
- 下一篇: 前端JavaScript规范