dropdownlist 中有3个选项:
分别为: <asp:DropDownList ID="DropDownList1" runat="server" Width="152px" AutoPostBack="True">
<asp:ListItem Value="0">未处理</asp:ListItem>
<asp:ListItem Value="1">通过</asp:ListItem>
<asp:ListItem Value="2">驳回</asp:ListItem>
</asp:DropDownList>
当选择驳回时候,才弹出thickbox。thickbox内嵌的是网页default2.aspx<a href="Default2.aspx?keepThis=true&TB_iframe=true&height=250&width=400" title="add a caption to title attribute / or leave blank" class="thickbox">例子1</a>问一下,怎样实现这个功能,小弟刚刚学会用thickbox,没有一点头绪
分别为: <asp:DropDownList ID="DropDownList1" runat="server" Width="152px" AutoPostBack="True">
<asp:ListItem Value="0">未处理</asp:ListItem>
<asp:ListItem Value="1">通过</asp:ListItem>
<asp:ListItem Value="2">驳回</asp:ListItem>
</asp:DropDownList>
当选择驳回时候,才弹出thickbox。thickbox内嵌的是网页default2.aspx<a href="Default2.aspx?keepThis=true&TB_iframe=true&height=250&width=400" title="add a caption to title attribute / or leave blank" class="thickbox">例子1</a>问一下,怎样实现这个功能,小弟刚刚学会用thickbox,没有一点头绪
去这里看看,有详细用法
http://hi.baidu.com/zhanghongweiyang/blog/item/b8ae5b8d04bbd71bb21bbae0.html
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
if (DropDownList1.SelectedValue == "2")
{
ClientScript.RegisterStartupScript(GetType(), "show", "$(document).ready(function(){ tb_show('add a caption to title attribute / or leave blank','Default2.aspx?keepThis=true&TB_iframe=true&height=250&width=400',false);});", true);
}
}
DropDownList1.attriabutes.add("onchange","selectOption();");
end if
页面加上js函数
function selectOption()
{
var objId = '<%= DropDownList1.ClientID %>';
var temp = document.getElementById(objId).value; if (temp == '2')
{
//调用tb_show函数,如5楼所写的
}
}