zoukankan      html  css  js  c++  java
  • 如何获取checkboxlist的多个选中项

                    string[] array = dt.Rows[0]["s_type"].ToString().Split('|');
                    foreach (ListItem m in cb_type.Items)
                    {
                        for (int i = 0; i < array.Length; i++)
                        {
                            if (m.Value == array[i])
                            {
                                m.Selected = true;
                            }
                        }
                    }
                    string[] strTerms = dt.Rows[0]["s_zhandian"].ToString().Split('|');
                    foreach (ListItem lItem in CB_zhandian.Items)
                    {
                        for (int i = 0; i < strTerms.Length; i++)
                        {
                            if (lItem.Value == strTerms[i])
                            {
                                lItem.Selected = true;
                            }
                        }
                    }

  • 相关阅读:
    dom2级事件兼容性写法
    cookie js案例
    cookie讲解
    js高级总结
    鼠标拖拽时,选择文字问题
    正则的细节
    正则捕获的细节及replace分析
    正则的使用及replace细讲
    while循环的讲解
    acwing 189. 乳草的入侵 bfs
  • 原文地址:https://www.cnblogs.com/candyzhmm/p/4255550.html
Copyright © 2011-2022 走看看