HTML checkbox - allow to check only one checkbox

前端 未结 5 1889
花落未央
花落未央 2021-01-19 14:07

I have some checkboxes in each row in my table. Each one checkbox has name=\'myName\' because I want to select only one checkbox in each row. But something I\'m

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-19 14:10

    sapSet = mbo.getThisMboSet()
    sapCount = sapSet.count()
    saplist = []
    
    if sapCount > 1:
       for i in range(sapCount):`enter code here`
         defaultCheck = sapSet.getMbo(i)
         saplist.append(defaultCheck.getInt("HNADEFACC"))
       defCount = saplist.count(1)
       if defCount > 1:
          errorgroup = " Please Note: you are allowed"
          errorkey = "  only One Default Account"
       if defCount < 1:
          errorgroup = " Please enter "
          errorkey = "  at leat One Default Account"
    else:
       mbo.setValue("HNADEFACC",1,MboConstants.NOACCESSCHECK)
    

提交回复
热议问题