LoginSignup
0

More than 5 years have passed since last update.

Table内のセレクトボックスで設定された値を取得、判定

Posted at

備忘録(自分用)

eq(i)のi番目(0はじまり)の列の値を総取得する
.select は、厳密には セレクトボックスの値を取得するためのセレクタを指定

function lock(intNo) {
    var flgUnconfirmed=false; /* NGフラグ */
    $('table.sec_'+intNo+' tr').each(function(i){
            chflg = $('td',this).eq(0).children(".select").val();
            if(chflg==0) flgUnconfirmed = true;
    });
    if(flgUnconfirmed==true){ 
            alert('未確認があります。'); 
            $('xxxx.sec_'+intNo).focus(); return;
        }
}

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0