js获取select选中的值: var sel=document.getElementById("select1"); var index = sel.selectedIndex; // 选中索引 albumid= sel.options[index].value;//要的值 jQuery获取下拉框选中的option: $("#s option:selected").val();
//vc6列表框多选时,获取哪些项被选中...... void CWebcyzDlg::OnButton2() { int n = m_mylist1.GetSelCount();//首先获取一共有多少项 int *p = new int[n];//堆中定义一个数组(动态大小) m_mylist1.GetSelItems(n, p);//通过GetSelitems填充数组 ; i < n; i++)//通过一个循环显示哪些项被选中 { CString str; str.Format("%d