第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

我有兩個復選框“接受”和“拒絕”并提交按鈕。當我點擊提交按鈕時,它應該檢查勾選了哪個復選框

我有兩個復選框“接受”和“拒絕”并提交按鈕。當我點擊提交按鈕時,它應該檢查勾選了哪個復選框

天涯盡頭無女友 2021-10-29 16:05:52
{ field: "Accept", title: commonLib.readMessageByUserLanguage(COLUMNTITLENAME.AcceptChk), "template": "<input type=\"checkbox\" # if (checkCommentsAccept(data.Comments)) { #disabled=\"disabled\" # } # />" },{ field: "Decline", title: commonLib.readMessageByUserLanguage(COLUMNTITLENAME.DeclineChk), "template": "<input type=\"checkbox\" # if (checkCommentsDecline(data.Comments)) { #disabled=\"disabled\" # } # />" },{ field: "Item", title: commonLib.readMessageByUserLanguage(COLUMNTITLENAME.Item) },{ field: "PartID", title: commonLib.readMessageByUserLanguage(COLUMNTITLENAME.PartID) },{ field: "Description", title: commonLib.readMessageByUserLanguage(COLUMNTITLENAME.Description), width: '300px' },{ field: "SubPart", title: commonLib.readMessageByUserLanguage(COLUMNTITLENAME.SubPart) },{ field: "SubPartDescription", title: commonLib.readMessageByUserLanguage(COLUMNTITLENAME.SubPartDescription) },{ field: "BusinessPartner", title: commonLib.readMessageByUserLanguage(COLUMNTITLENAME.BusinessPartner) },{ field: "ReqDelTM", title: commonLib.readMessageByUserLanguage(COLUMNTITLENAME.ReqDelTM) },{ field: "EarDelTM", title: commonLib.readMessageByUserLanguage(COLUMNTITLENAME.EarDelTM) },{ field: "EarDelDate", title: "Ear Del Date", hidden: true },{ field: "Comments", title: commonLib.readMessageByUserLanguage(COLUMNTITLENAME.Comments) }當我點擊提交按鈕時,它應該檢查接受復選框是否被選中,如果被選中,那么我有一些邏輯。如果拒絕復選框被選中,那么我有一些其他的邏輯。
查看完整描述

2 回答

?
SMILET

TA貢獻1796條經(jīng)驗 獲得超4個贊

如果有復選框,您可能已經(jīng)實現(xiàn)只選中單個復選框,對嗎?,否則可能會選中接受和拒絕兩個復選框,


假設您已經(jīng)實現(xiàn)了單選復選框邏輯


$( "form" ).submit(function( event ) {

  event.preventDefault();

  if($("input[type='checkbox']:checked")[0].val() == 'Allow'){

    // things to done on allowed

  }else  if($("input[type='checkbox']:checked")[0].val() == 'Declined'){

    // things to done on declined

  }else{

    // rest things 

  }

});

您可能需要稍微更改代碼,但它會根據(jù)您的需要在邏輯上工作。


查看完整回答
反對 回復 2021-10-29
  • 2 回答
  • 0 關注
  • 208 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號