如何在下拉列表dropdownlist里加超级链接?

来源:百度知道 编辑:UC知道 时间:2024/06/20 14:12:55
如何在下拉列表dropdownlist里加超级链接?
如何在下拉列表dropdownlist里加超级链接?

<script language="javascript">
function Open(thisform){
if (thisform.options[thisform.selectedIndex].value.length>0)
window.open(thisform.options[thisform.selectedIndex].value);

}
</script>放在任何地方都可以

<asp:DropDownList ID="ddlClass" runat="server" onchange="Open(this);">
<asp:ListItem Selected="True" Value=www.baidu.com>未选择栏目</asp:ListItem>
</asp:DropDownList>
只要加入以上的那个JAVASCRIPT代码就可以了,之后再在DROPDOWNLIST里调用一下方法就可以了,