asfman
android developer
posts - 90,  comments - 213,  trackbacks - 0
<script language="C#" runat="server">
void SubmitBtn_Click(Object Sender, EventArgs e)
{
//string SelectedIndex = DropDown1.SelectedIndex;
string SelectedText = DropDown1.SelectedItem.Text;
string SelectedValue = DropDown1.SelectedItem.Value;
Label1.Text="您选择的讨论区是:<font color=red>"+SelectedText+"<br></font>值为:<font color=red>"+SelectedValue+"</font>";
}
</script>
<html>
<head>
</head>
<body>
<b><font face="Verdana">DropDownList 示例</font></b>
<form runat=server>
<asp:DropDownList id=DropDown1 runat="server">
<asp:ListItem value="ASP.Net">ASP.Net区</asp:ListItem>
<asp:ListItem value="JSP">JSP区</asp:ListItem>
<asp:ListItem value="C#">C#区</asp:ListItem>
<asp:ListItem value="PHP">PHP区</asp:ListItem>
<asp:ListItem value="VBVC">VBVC区</asp:ListItem>
<asp:ListItem value="HTML">HTML区</asp:ListItem>
</asp:DropDownList>
<asp:button text="选择" OnClick="SubmitBtn_Click" runat=server/>
<p>
<asp:Label id=Label1 font-size="10pt" runat="server">
请选择一个讨论区
</asp:Label>
</form>
</body>
</html>
posted on 2006-04-03 13:59 汪杰 阅读(155) 评论(0)  编辑 收藏 引用 所属分类: hengxing网站js
只有注册用户登录后才能发表评论。

<2024年5月>
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

常用链接

留言簿(15)

随笔分类(1)

随笔档案(90)

文章分类(727)

文章档案(712)

相册

收藏夹

http://blog.csdn.net/prodigynonsense

友情链接

最新随笔

搜索

  •  

积分与排名

  • 积分 - 459271
  • 排名 - 6

最新随笔

最新评论

阅读排行榜

评论排行榜