請選擇汽車類型:

亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

ASP.NET jQuery 食譜16 (通過控件CustomValidat

系統 2049 0

上一節已經介紹過控件CustomValidator的使用方法,下面直接看代碼。

界面代碼:

      
        <
      
      
        form 
      
      
        id
      
      
        ="form1"
      
      
         runat
      
      
        ="server"
      
      
        >
      
      
< div align ="center" >
< fieldset style ="width: 350px; height: 200px;" >
< table border ="0" cellpadding ="3" cellspacing ="3" >
< tr >
< td >
請選擇汽車類型:
</ td >
</ tr >
< tr >
< td >
< asp:RadioButtonList ID ="rbCar" runat ="server" >
< asp:ListItem Value ="1" Text ="奔馳汽車" ></ asp:ListItem >
< asp:ListItem Value ="2" Text ="寶馬汽車" ></ asp:ListItem >
< asp:ListItem Value ="3" Text ="奧迪汽車" ></ asp:ListItem >
< asp:ListItem Value ="4" Text ="現代汽車" ></ asp:ListItem >
< asp:ListItem Value ="5" Text ="豐田汽車" ></ asp:ListItem >
</ asp:RadioButtonList >
</ td >
</ tr >
< tr >
< td >
< asp:Button ID ="btnSubmit" runat ="server" Text ="提交" />
</ td >
</ tr >
</ table >
</ fieldset >
< asp:CustomValidator ID ="ctvCar" runat ="server" Display ="Dynamic" ErrorMessage ="至少選擇一種車!"
ForeColor
="Red" ClientValidationFunction ="rbCar_Validation" ></ asp:CustomValidator >
</ div >
</ form >

腳本代碼:

      
        <
      
      
        head 
      
      
        id
      
      
        ="Head1"
      
      
         runat
      
      
        ="server"
      
      
        >
      
      
< title > Recipe16 </ title >
< script type ="text/javascript" src ="Scripts/jquery-1.4.1-vsdoc.js" ></ script >
< script type ="text/javascript" >
function rbCar_Validation(sender, args) {
args.IsValid
= ($( " #rbCar :radio:checked " ).length > 0 );
}
</ script >
</ head >

顯示效果:

ASP.NET jQuery 食譜16 (通過控件CustomValidator驗證RadioButtonList)_第1張圖片



?

ASP.NET jQuery 食譜16 (通過控件CustomValidator驗證RadioButtonList)


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 久久女同互慰一区二区三区 | 成人影院免费在线观看 | 99影视网 | 国产精品综合在线 | 久久桃花网 | 亚洲国产美女视频 | 不卡免费播放 | 免费女人18毛片a级毛片视频 | 久久精品乱子伦免费 | 国产成人啪精品视频免费网 | 国产精品第二页 | 国产精品成人h片在线 | a视频在线看 | 久久精品国产半推半就 | 人人97| 在线播放heyzo北条麻妃 | 久久99亚洲精品久久久久99 | 在线观看h片 | 国产成人系列 | 高清不卡在线 | 国产乱子伦| 欧美亚洲国产精品久久久久 | 国产第一福利 | 国产精品久久国产精品99 | 国产网红在线视频 | 色福利网| 97视频网站 | 日日夜夜精品免费视频 | 欧美日韩一区二区三区毛片 | 九色最新网址 | 黄色操视频 | 寂寞午夜影院 | 国产欧美另类 | 777奇米视频 | 成人午夜爽爽爽免费视频 | 99热久久这里只有精品7 | 日日摸夜夜摸无需播放器 | 成人国产精品免费视频 | 九九热精品免费视频 | 国产欧美视频一区二区三区 | 一本久道热中字伊人 |