如何在下拉菜单里选好值后在同一页面里触发一个多选框,选好值后与这个页面的其他内容一同传给下一个页面

orangefrog 2005-10-14 09:45:31
我做了一个短信平台,有一个群发功能,以组的形式分类,发送页面里包括选组的下拉菜蛋和短信内容的文本框,当下拉菜单中选好组,希望选好组的同时能出发一个事件把这个组里的人员显示出来,再选这个组里的任意人员,选好后,同这个页面里的短信内容一起发出去,不知道怎么才能实现这样的功能,请各位大虾帮帮忙,急,谢谢。代码如下:
<form name="SendMessageForm" method="POST" action="mulsend.asp">
<TABLE cellSpacing=1 cellPadding=3 width="100%" bgColor=#e8e8e8>
<TBODY>
<TR>
<TD align=middle width=100 bgColor=#f8f8f8 height=30>选 择 组 名 :</TD>
<TD valign="bottom" bgColor=#f8f8f8><select name="groupname" style="height: 23; width: 127">
<option value="">-请选择组-</option>
<%set rs1=server.createobject("adodb.recordset")
sql="select * from tblgroupname where userid='"&session("LoginID")&"' order by id"
rs1.open sql,oconn,3,3
do while not rs1.eof
%>
<option value="<%=rs1("id")%>"><%=trim(rs1("groupname"))%></option>
<%rs1.movenext
loop
rs1.close%>
</select>
<input type="radio" name="singlesend" value="singlesend" onclick="if(this.checked) location.href='index.asp';">
</TR>
</TABLE>
</form>
...全文
173 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
lovelovepig 2005-12-19
  • 打赏
  • 举报
回复
orangefrog 2005-10-15
  • 打赏
  • 举报
回复
二级菜单只能是实现选择一个值,我希望能够多选,选中一个组名的同时能够触发一个可以多选的界面,有实现这样功能的方法吗,谢谢.
lnboy1003 2005-10-14
  • 打赏
  • 举报
回复
这是2级连动菜单参考参考看能不能帮上你
lnboy1003 2005-10-14
  • 打赏
  • 举报
回复
<%
dim rs
dim sql
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from type order by id"
rs.open sql,conn,1,1
%>
<script language="JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("type"))%>","<%= trim(rs("suoshu"))%>","<%= trim(rs("typeid"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;

function changelocation(locationid)
{
document.form1.typeid.length = 0;

var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.form1.typeid.options[document.form1.typeid.length] = new Option(subcat[i][0], subcat[i][2]);
}
}

}
</script>
<form name="form1" method="post" action="donewsadd.asp">
<tr>
<td width="20%"> <div align="right">所属频道:</div></td>
<td> <select name="suoshu" class="select" onChange="changelocation(document.form1.suoshu.options[document.form1.suoshu.selectedIndex].value)">
<option selected value="">请选择所属频道</option>
<%set rs=server.CreateObject("ADODB.RecordSet")
sql = "select * from bigtype where zhuanshu<>3 and iscontent<>2 order by id"
rs.open sql,conn,1,1
if not rs.eof then%>
<%do while not rs.eof%>
<option value="<%=trim(rs("type"))%>"><%=trim(rs("type"))%></option>
<%rs.movenext
loop%>
</select> <%end if
rs.close%> </td>
</tr>
<tr>
<td><div align="right">所属类别:</div></td>
<td> <select name="typeid" class="select">
<option selected value="">请选择所属类别</option>
<%set rs=server.CreateObject("ADODB.RecordSet")
sql="select * from type where suoshu='"&suoshu&"' and zhuanshu<>3 and iscontent<>2 order by id"
rs.open sql,conn,1,1
if not rs.eof then%>
<%do while not rs.eof%>
<option value="<%=rs("typeid")%>"><%=rs("type")%></option>
<%rs.movenext
loop
end if
rs.close%>
</select></td>
</t>
</form>
xxgu 2005-10-14
  • 打赏
  • 举报
回复
读组员的具体sql?
这个用两级菜单联动就可以实现
网上有好多类似的源代码
htmltable {th, td {th {pre {简介:在前端开发中,保证下拉菜单页面刷新后选中值不变以及提交按钮后能够保存当前选中值是一个常见的需求。这涉及到如何在客户端存储和恢复用户的选择状态,包括使用LocalStorage或SessionStorage进行本地存储,以及可能的URL参数、服务器端会话和cookies等策略。开发者需要了解HTML