DropDownList问题! 选中一项! 如何弹出一个新的连接页面! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { if(this.DropDownList1.SelectedItem.Text=="") { Response.Redirect(""); } } 用前台 jsfunction jumpto(){ var drop = document.getElemntById('dropdownlist1'); var url = drop.value; window.open(url);}<dropdownlist id = '' ... onchange = "jumpto()"> <listitem value="http://www.sina.com.cn">新浪</listitem> <listitem value="http://www.163.com.cn">网易</listitem> <listitem value="http://www.csdn.com.cn">CSDN</listitem></dropdownlist> 第一种是服务端方法:先把AutoPostBack属性设置为True然后:第二种: 客户端方法(JS实现) 你要想保留以前的页面,只要设置一下target就可以了。 网站基本建好了,10个问题征求一下大家的意见。 JQUERY 的小问题,大家进来看看 列表顺序改变后更新问题,sql好点的帮忙看看 如何在JScript.js里获得TextBox1的值 奇怪的编译错误 一般数据库字段命名用英文还是汉字? bmp图片透明打印 在ASPX页面加载时载入XML有问题。。? 把一条一条的数据读取到DataGrid或DataList里面,能实现向上滚动的效果吗 怪问题,,急 +++如何在客户端执行c#代码??+++ JavaScript在https和http的问题
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
if(this.DropDownList1.SelectedItem.Text=="")
{
Response.Redirect("");
} }
{
var drop = document.getElemntById('dropdownlist1');
var url = drop.value;
window.open(url);
}<dropdownlist id = '' ... onchange = "jumpto()">
<listitem value="http://www.sina.com.cn">新浪</listitem>
<listitem value="http://www.163.com.cn">网易</listitem>
<listitem value="http://www.csdn.com.cn">CSDN</listitem>
</dropdownlist>
第一种是服务端方法:
先把AutoPostBack属性设置为True
然后:第二种: 客户端方法(JS实现)