以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]selsect多选  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=135202)

--  作者:OKK
--  发布时间:2019/5/20 17:11:00
--  [求助]selsect多选
sb.AppendLine("            <td><select multiple=\'multiple\' name=\'forc\'  style=\'width: 200px; height: 29px\'><option>" & "客户" & "</option><option>" & "员工" & "</option></select></td>")


以上代码,为什么还是单选,怎样才能多选?

--  作者:有点甜
--  发布时间:2019/5/20 17:17:00
--  

按住ctrl才能多选

 

http://www.w3school.com.cn/tags/att_select_multiple.asp

 


--  作者:OKK
--  发布时间:2019/5/20 17:26:00
--  
原来这样,,,谢谢图片点击可在新窗口打开查看
--  作者:OKK
--  发布时间:2019/5/20 19:01:00
--  
Dim e As RequestEventArgs = args(0)
Dim sb As New StringBuilder

If e.Path = "cello" Or e.PostValues.ContainsKey("ce1") 
messagebox.show(e.PostValues("ce1"))
tables("表A").current("第一列") = e.PostValues("ce1")
End If

Select Case e.Path
Case "cello"

sb.AppendLine("<!doctype html>")
sb.AppendLine("<html >")
sb.AppendLine("<head runat=\'server\'>")
sb.AppendLine("<meta name=\'viewport\' c>")
sb.AppendLine("    <title></title>")
sb.AppendLine("    <style type=\'text/css\'>")
sb.AppendLine("        #Text1")
sb.AppendLine("        {")
sb.AppendLine("            width: 904px;")
sb.AppendLine("            height: 598px;")
sb.AppendLine("        }")
sb.AppendLine("")
sb.AppendLine("        .style38")
sb.AppendLine("        {")
sb.AppendLine("            color: #FFFF00;")
sb.AppendLine("            font-family: 方正舒体;")
sb.AppendLine("        }")
sb.AppendLine("        .style26")
sb.AppendLine("        {")
sb.AppendLine("            width: 79px;")
sb.AppendLine("        }")
sb.AppendLine("        .style29")
sb.AppendLine("        {")
sb.AppendLine("            font-size: xx-large;")
sb.AppendLine("            color: #99CC00;")
sb.AppendLine("            font-family: 方正舒体;")
sb.AppendLine("        }")
sb.AppendLine("        .style37")
sb.AppendLine("        {")
sb.AppendLine("            font-size: xx-large;")
sb.AppendLine("            color: #99CC00;")
sb.AppendLine("            font-family: 宋体, Arial, Helvetica, sans-serif;")
sb.AppendLine("            font-weight: bold;")
sb.AppendLine("        }")
sb.AppendLine("        .style27")
sb.AppendLine("        {")
sb.AppendLine("            height: 11px;")
sb.AppendLine("        }")
sb.AppendLine("        .style36")
sb.AppendLine("        {")
sb.AppendLine("            width: 85px;")
sb.AppendLine("        }")
sb.AppendLine("        .style32")
sb.AppendLine("        {")
sb.AppendLine("            font-family: 宋体, Arial, Helvetica, sans-serif;")
sb.AppendLine("        }")
sb.AppendLine("        .style30")
sb.AppendLine("        {")
sb.AppendLine("            color: #660066;")
sb.AppendLine("            font-family: 方正舒体;")
sb.AppendLine("            }")
sb.AppendLine("        .style56")
sb.AppendLine("        {")
sb.AppendLine("            text-align: center;")
sb.AppendLine("        }")
sb.AppendLine("        .style57")
sb.AppendLine("        {")
sb.AppendLine("            color: #990099;")
sb.AppendLine("            font-size: x-large;")
sb.AppendLine("            text-align: center;")
sb.AppendLine("            font-weight: bold;")
sb.AppendLine("        }")
sb.AppendLine("        .style58")
sb.AppendLine("        {")
sb.AppendLine("            text-decoration: none;")
sb.AppendLine("            color: #660066;")
sb.AppendLine("        }")
sb.AppendLine("        .auto-style1")
sb.AppendLine("        {")
sb.AppendLine("            font-size: x-large;")
sb.AppendLine("            text-align: center;")
sb.AppendLine("        }")
sb.AppendLine("        .style73")
sb.AppendLine("        {")
sb.AppendLine("            font-weight: 700;")
sb.AppendLine("            font-size: x-large;")
sb.AppendLine("            text-align: center;")
sb.AppendLine("        }")
sb.AppendLine("        .auto-style3")
sb.AppendLine("        {")
sb.AppendLine("            height: 96px;")
sb.AppendLine("        }")
sb.AppendLine("        .auto-style5")
sb.AppendLine("        {")
sb.AppendLine("            width: 40px;")
sb.AppendLine("        }")
sb.AppendLine("        .auto-style4")
sb.AppendLine("        {")
sb.AppendLine("            width: 237px;")
sb.AppendLine("        }")
sb.AppendLine("        </style>")
sb.AppendLine("</head>")
sb.AppendLine("<body style=\'width: 100%;margin:auto;\'>")
sb.AppendLine("<form enctype=\'multipart/form-data\' method=\'post\' name=\'form1\' style=\'width: 100%; height: 100%; margin-right: 0px;\'> ")
sb.AppendLine("    <Table style=\'width:100%;margin:auto; background-color: #CCFFFF;\'>")                    
sb.AppendLine("        <tr>")
sb.AppendLine("            <td><Select multiple=\'multiple\' size=\'2\' name=\'ce1\'  style=\'width:100%; height: 29px\' ><option>" & "客户1" & "</option><option>" & "客户2" & "</option></Select></td>")
sb.AppendLine("        </tr>")
sb.AppendLine("            <td style=\'height: 29px;\'dir=\'rtl\'><input Type=\'submit\' style=\'width:70%; height: 35px;font-size: x-large\' value=\'  确认 \'></td>")
sb.AppendLine("    </Table>")
sb.AppendLine("    </form>")
sb.AppendLine("</body>")
sb.AppendLine("</html>")

e.WriteString(sb.ToString)
End Select





两个问题:
第一、打开页面后,select框没有内容, 只显示"选择了0项",我需要显示"客户1"
第二、选择了"客户1"和"客户2",再点击确认,表A第一列只保存到"客户1",设置messagebox.show,也只弹出"客户1"

--  作者:有点蓝
--  发布时间:2019/5/20 21:27:00
--  
Foxtable不支持这种多选的用法,服务端无法获取到多个值
--  作者:OKK
--  发布时间:2019/5/20 21:54:00
--  
那有什么方法可以多选
--  作者:有点蓝
--  发布时间:2019/5/20 22:11:00
--  
参考:http://www.foxtable.com/mobilehelp/scr/0053.htm

或者自己使用js处理值,合并成“值1,值2”这种格式的数据使用ajex提交数据



--  作者:OKK
--  发布时间:2019/5/20 22:20:00
--  
OK,谢谢