Foxtable(狐表)用户栏目专家坐堂 → 单选按钮全部选中问题


  共有2740人关注过本帖树形打印复制链接

主题:单选按钮全部选中问题

帅哥哟,离线,有人找我吗?
刘林
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:八尾狐 帖子:1953 积分:15015 威望:0 精华:0 注册:2016/4/28 9:58:00
单选按钮全部选中问题  发帖心情 Post By:2020/11/7 15:24:00 [显示全部帖子]

Dim e As RequestEventArgs = args(0)
Dim wb As New WeUI
wb.InsertHTML("<script src='../mui/js/mui.min.js'></script>")
wb.InsertHTML("<link href='../mui/css/mui.css' rel='stylesheet'/>")
wb.InsertHTML("<script Type='text/javascript' charset='utf-8'>mui.init();</script>")
wb.InsertHTML("</head>")
wb.InsertHTML("<body>")
wb.InsertHTML("<header class='mui-bar mui-bar-nav mui-bar-nav-bg'>")
wb.InsertHTML("<a  id='icon-menu' class='mui-action-back mui-icon mui-icon-left-nav mui-pull-left'></a>")
wb.InsertHTML("<h1 class='mui-title'>学生转出权限管理</h1>")
wb.InsertHTML("</header>")
wb.InsertHTML("<div class='mui-content'>")
wb.AddPageTitle("","pageheader","","")
wb.AddToast("","t1", "正在上传",1) '定义提示
wb.AddForm("","form1","jcsdsave.htm").attribute= """
Dim cmd As new SQLCommand
cmd.C
cmd.CommandText ="Se/ect [学校名称],[班级],[学生姓名],[身份证件号],[审核锁定],[_Identify] From {学生信息} where  [班级]='" & e.Cookies("bj") & "' and [学校名称]='" & e.Cookies("userdw") & "' and  [班级]='" & e.Cookies("bj") & "' order by [学生姓名]"
Dim dt As DataTable =  cmd.ExecuteReader(True)
wb.insertHtml("form1", "<div style='maring:10px;display: inline-block;width:120px;'><input Type='radio' id= 'noall' name='all' value='noall' >全部禁止转出</input></div><div style='maring-left:20px;display: inline-block;width:120px;'><input Type='radio' id='yesall' name='all' value='yesall'>全部允许转出</input></div><div style='maring-left:20px;display: inline-block;width:120px;'><input Type='radio' id= 'choose' name='all' value='choose' checked >选择授权转出</input></div>")
wb.InsertHTML("form1", "<Table border=1 cellspacing=0 style='width:100%;text-align:center;'><tr style=height:45px;color:red;'><td style='text-align:center;font-size: 15px;strong'>序号</td><td style='text-align:center;font-size: 15px;strong'>学生姓名</td><td style='text-align:center;font-size: 15px;strong'>禁止转出</td><td style='text-align:center;font-size: 15px;strong'>允许转出</td></tr>")
Dim i As Integer=1
For Each dr As DataRow In dt.DataRows
    If dr("审核锁定")=True
        wb.insertHtml("form1", "<tr style='height:45px;'><td style=font-size:15px' >" & i & "</td> <td style=font-size:15px' ><a href='sdxsxx.htm?xssfzh=" & dr("身份证件号") & "'>" & dr("学生姓名") & "</a></td><td><input type='radio'  id='yes_" & dr("_Identify") & "' name='radio1_" & dr("_Identify") & "' value='yes_" & dr("_Identify") & "' checked></td><td><input type='radio' id= 'no_" & dr("_Identify") & "' name='radio1_" & dr("_Identify") & "' value='no_" & dr("_Identify") & "' ></td></tr>")
    Else
        wb.insertHtml("form1", "<tr style='height:45px;'><td style=font-size:15px' >" & i & "</td> <td style=font-size:15px' ><a href='sdxsxx.htm?xssfzh=" & dr("身份证件号") & "'>" & dr("学生姓名") & "</a></td><td><input type='radio'  id='yes_" & dr("_Identify") & "' name='radio1_" & dr("_Identify") & "' value='yes_" & dr("_Identify") & "' ></td><td><input type='radio' id= 'no_" & dr("_Identify") & "' name='radio1_" & dr("_Identify") & "' value='no_" & dr("_Identify") & "'  checked ></td></tr>")
    End If
    i=i+1
Next
wb.insertHtml("form1", "</Table>")
wb.InsertHTML("form1","<button Type='submit'  name='submit'  style='position: fixed;left:50%;transform:translate(-50%);bottom:20px;z-index:5;weight:35px;width:35px;background-image:url(../tubiao/ok.png);width: 32px;height: 32px;background-repeat:no-repeat ;background-size:32px 32px; border: 0;background-color: transparent;'></button>")
e.WriteString(wb.Build)
e.Handled=True


老师,请问我上面做的三个单选按钮我想在点全部允许转出时下面表格中的允许转出列的单选按钮就变为全部选中这种怎么写,谢谢

 回到顶部
帅哥哟,离线,有人找我吗?
刘林
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:八尾狐 帖子:1953 积分:15015 威望:0 精华:0 注册:2016/4/28 9:58:00
  发帖心情 Post By:2020/11/7 16:42:00 [显示全部帖子]

Dim e As RequestEventArgs = args(0)
Dim wb As New WeUI
wb.InsertHTML("<script src='../mui/js/mui.min.js'></script>")
wb.InsertHTML("<link href='../mui/css/mui.css' rel='stylesheet'/>")
wb.InsertHTML("<script Type='text/javascript' charset='utf-8'>mui.init();</script>")
wb.InsertHTML("</head>")
wb.InsertHTML("<body>")
wb.InsertHTML("<header class='mui-bar mui-bar-nav mui-bar-nav-bg'>")
wb.InsertHTML("<a  id='icon-menu' class='mui-action-back mui-icon mui-icon-left-nav mui-pull-left'></a>")
wb.InsertHTML("<h1 class='mui-title'>在校学生转出权限管理</h1>")
wb.InsertHTML("</header>")
wb.InsertHTML("<div class='mui-content'>")
wb.AddPageTitle("","pageheader","","")
wb.AddToast("","t1", "正在上传",1) '定义提示
wb.AddForm("","form1","jcsdsave.htm").attribute= """
Dim cmd As new SQLCommand
cmd.C
cmd.CommandText ="Se/ect [学校名称],[班级],[学生姓名],[身份证件号],[审核锁定],[_Identify] From {学生信息} where  [班级]='" & e.Cookies("bj") & "' and [学校名称]='" & e.Cookies("userdw") & "' and  [班级]='" & e.Cookies("bj") & "' order by [学生姓名]"
Dim dt As DataTable =  cmd.ExecuteReader(True)
wb.insertHtml("form1", "<div style='maring:10px;display: inline-block;width:120px;'><input Type='radio' id= 'noall' name='all' value='noall' >全部禁止转出</input></div><div style='maring-left:20px;display: inline-block;width:120px;'><input Type='radio' id='yesall' name='all' value='yesall' >全部允许转出</input></div><div style='maring-left:20px;display: inline-block;width:120px;'><input Type='radio' id= 'choose' name='all' value='choose' checked >选择授权转出</input></div>")
wb.InsertHTML("form1", "<Table border=1 cellspacing=0 style='width:100%;text-align:center;'><tr style=height:45px;color:red;'><td style='text-align:center;font-size: 15px;strong'>序号</td><td style='text-align:center;font-size: 15px;strong'>学生姓名</td><td style='text-align:center;font-size: 15px;strong'>禁止转出</td><td style='text-align:center;font-size: 15px;strong'>允许转出</td></tr>")
Dim i As Integer=1
For Each dr As DataRow In dt.DataRows
    If dr("审核锁定")=True
        wb.insertHtml("form1", "<tr style='height:45px;'><td style=font-size:15px' >" & i & "</td> <td style=font-size:15px' ><a href='sdxsxx.htm?xssfzh=" & dr("身份证件号") & "'>" & dr("学生姓名") & "</a></td><td><input type='radio' class='aa'  id='yes_" & dr("_Identify") & "' name='radio1_" & dr("_Identify") & "' value='yes_" & dr("_Identify") & "' checked></td><td><input type='radio' class='ab' id= 'no_" & dr("_Identify") & "' name='radio1_" & dr("_Identify") & "' value='no_" & dr("_Identify") & "' ></td></tr>")
    Else
        wb.insertHtml("form1", "<tr style='height:45px;'><td style=font-size:15px' >" & i & "</td> <td style=font-size:15px' ><a href='sdxsxx.htm?xssfzh=" & dr("身份证件号") & "'>" & dr("学生姓名") & "</a></td><td><input type='radio' class='aa'  id='yes_" & dr("_Identify") & "' name='radio1_" & dr("_Identify") & "' value='yes_" & dr("_Identify") & "' ></td><td><input type='radio' class='ab' id= 'no_" & dr("_Identify") & "' name='radio1_" & dr("_Identify") & "' value='no_" & dr("_Identify") & "'  checked ></td></tr>")
    End If
    i=i+1
Next
wb.insertHtml("form1", "</Table>")
wb.InsertHTML("form1","<button Type='submit'  name='submit'  style='position: fixed;left:50%;transform:translate(-50%);bottom:20px;z-index:5;weight:35px;width:35px;background-image:url(../tubiao/ok.png);width: 32px;height: 32px;background-repeat:no-repeat ;background-size:32px 32px; border: 0;background-color: transparent;'></button>")
wb.InsertHTML("form1", "<script>Function myFunction1(){var x = document.querySelectorAll('.ab');  var i;for (i = 0; i < x.length; i++) {x[i].checked = 'true';}</script>")
e.WriteString(wb.Build)
e.Handled=True


老师,你这样做了没反应,表中允许转出列的单选没动,请帮看下哪里还有问题

 回到顶部
帅哥哟,离线,有人找我吗?
刘林
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:八尾狐 帖子:1953 积分:15015 威望:0 精华:0 注册:2016/4/28 9:58:00
  发帖心情 Post By:2020/11/7 16:55:00 [显示全部帖子]

Dim e As RequestEventArgs = args(0)
Dim wb As New WeUI
wb.InsertHTML("<script src='../mui/js/mui.min.js'></script>")
wb.InsertHTML("<link href='../mui/css/mui.css' rel='stylesheet'/>")
wb.InsertHTML("<script Type='text/javascript' charset='utf-8'>mui.init();</script>")
wb.InsertHTML("</head>")
wb.InsertHTML("<body>")
wb.InsertHTML("<header class='mui-bar mui-bar-nav mui-bar-nav-bg'>")
wb.InsertHTML("<a  id='icon-menu' class='mui-action-back mui-icon mui-icon-left-nav mui-pull-left'></a>")
wb.InsertHTML("<h1 class='mui-title'>在校学生转出权限管理</h1>")
wb.InsertHTML("</header>")
wb.InsertHTML("<div class='mui-content'>")
wb.AddPageTitle("","pageheader","","")
wb.AddToast("","t1", "正在上传",1) '定义提示
wb.AddForm("","form1","jcsdsave.htm").attribute= """
Dim cmd As new SQLCommand
cmd.C
cmd.CommandText ="Se/ect [学校名称],[班级],[学生姓名],[身份证件号],[审核锁定],[_Identify] From {学生信息} where  [班级]='" & e.Cookies("bj") & "' and [学校名称]='" & e.Cookies("userdw") & "' and  [班级]='" & e.Cookies("bj") & "' order by [学生姓名]"
Dim dt As DataTable =  cmd.ExecuteReader(True)
wb.insertHtml("form1", "<div style='maring:10px;display: inline-block;width:120px;'><input Type='radio' id= 'noall' name='all' value='noall' >全部禁止转出</input></div><div style='maring-left:20px;display: inline-block;width:120px;'><input Type='radio' id='yesall' name='all' value='yesall'  onc/ick='myFunction1()'>全部允许转出</input></div><div style='maring-left:20px;display: inline-block;width:120px;'><input Type='radio' id= 'choose' name='all' value='choose' checked >选择授权转出</input></div>")
wb.InsertHTML("form1", "<Table border=1 cellspacing=0 style='width:100%;text-align:center;'><tr style=height:45px;color:red;'><td style='text-align:center;font-size: 15px;strong'>序号</td><td style='text-align:center;font-size: 15px;strong'>学生姓名</td><td style='text-align:center;font-size: 15px;strong'>禁止转出</td><td style='text-align:center;font-size: 15px;strong'>允许转出</td></tr>")
Dim i As Integer=1
For Each dr As DataRow In dt.DataRows
    If dr("审核锁定")=True
        wb.insertHtml("form1", "<tr style='height:45px;'><td style=font-size:15px' >" & i & "</td> <td style=font-size:15px' ><a href='sdxsxx.htm?xssfzh=" & dr("身份证件号") & "'>" & dr("学生姓名") & "</a></td><td><input type='radio' class='aa'  id='yes_" & dr("_Identify") & "' name='radio1_" & dr("_Identify") & "' value='yes_" & dr("_Identify") & "' checked></td><td><input type='radio'class='ab' id= 'no_" & dr("_Identify") & "' name='radio1_" & dr("_Identify") & "' value='no_" & dr("_Identify") & "' ></td></tr>")
    Else
        wb.insertHtml("form1", "<tr style='height:45px;'><td style=font-size:15px' >" & i & "</td> <td style=font-size:15px' ><a href='sdxsxx.htm?xssfzh=" & dr("身份证件号") & "'>" & dr("学生姓名") & "</a></td><td><input type='radio' class='aa'  id='yes_" & dr("_Identify") & "' name='radio1_" & dr("_Identify") & "' value='yes_" & dr("_Identify") & "' ></td><td><input type='radio' class='ab' id= 'no_" & dr("_Identify") & "' name='radio1_" & dr("_Identify") & "' value='no_" & dr("_Identify") & "'  checked ></td></tr>")
    End If
    i=i+1
Next
wb.insertHtml("form1", "</Table>")
wb.InsertHTML("form1","<button Type='submit'  name='submit'  style='position: fixed;left:50%;transform:translate(-50%);bottom:20px;z-index:5;weight:35px;width:35px;background-image:url(../tubiao/ok.png);width: 32px;height: 32px;background-repeat:no-repeat ;background-size:32px 32px; border: 0;background-color: transparent;'></button>")
wb.AppendHTML("<script>Function myFunction1(){var x = document.querySelectorAll('.ab');  var i;for (i = 0; i < x.length; i++) {x[i].checked = 'true';}</script>")
e.WriteString(wb.Build)在于
e.Handled=True


还没得行,请帮再看下什么问题
[此贴子已经被作者于2020/11/7 16:59:15编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
刘林
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:八尾狐 帖子:1953 积分:15015 威望:0 精华:0 注册:2016/4/28 9:58:00
  发帖心情 Post By:2020/11/7 17:05:00 [显示全部帖子]

解决了,谢谢

 回到顶部