asp.net 中javascript 脚本 有一个dropdownlist 和一个button ,当我选择完dropdownlist选项后点击button 按钮提交的时候我希望弹出一个对话框 显示出我刚才所选择的dropdownlist 值,并且有一个提示是否确定提交或者是取消。这个应该怎么做 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 var value = droplist1.options[droplist1.selectedIndex].valueif(confirm('确定选择' + value + '吗?')){ //true}else{ //false;} <asp:button onclientclick="check()" /> <form id="form1" runat="server"> <div> <asp:DropDownList ID="DropDownList1" runat="server"> <asp:ListItem>aaa</asp:ListItem> <asp:ListItem>bbb</asp:ListItem> </asp:DropDownList> <asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="confirm('是否确定选中'+document.getElementById('DropDownList1').value);" /></div></form> this.Button1.Attributes.Add("onclick","return confirm('确实要选择"+this.dropdownlist.SelectedValue+"吗')") C#操作xml哪种方式性能比较高 iis http 404 not found ********AutoCompleteExtender控件问题请教 幻灯片 图片路径问题。。。 请教DataNavigateUrlFormatString="page.aspx?ID={0}"啥意思? 关于GridView的删除确认问题 怎么给客户端传一个二进制流 用没有system.web.mail(c#+aspx)发电子邮件的源代码 一个很奇怪的问题~~ 关于一个导出EXCEL的问题。 日期格式显示问题 整合网站
if(confirm('确定选择' + value + '吗?'))
{
//true
}
else
{
//false;
}
<div>
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem>aaa</asp:ListItem>
<asp:ListItem>bbb</asp:ListItem>
</asp:DropDownList>
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="confirm('是否确定选中'+document.getElementById('DropDownList1').value);" />
</div>
</form>