textbox 焦点问题 我想实现鼠标点击在TEXTBOX中时 ,dropdownlist显示,鼠标离开TEXTBOX时,dropdownlist隐藏。帮帮忙 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 TextBox1.TextChage()事件中写if(DropDownlist1.visible){DropDownlist1.visible=false;}else{....} 记得吧TextBox的OutPostBack属性设置为True js函数:function hide(){//类似代码document.getElementById("ddl").stytle="";//}function show(){//类似代码document.getElementById("ddl").stytle="";//}<asp:textbox id="txt" runat="server" onfocus="hide();" onblur="show();"></textbox><asp:dropdownList id="ddl" runat="server"></asp:dropdownlist> <input type="text" onmouseover="showHideDropdown(true)" onmouseout="showHideDropdown(false)" /> <br /> <asp:DropDownList ID="ddl" runat="server"> <asp:ListItem>a</asp:ListItem> <asp:ListItem>b</asp:ListItem> </asp:DropDownList> </form> <script type="text/javascript"> function showHideDropdown(type) { document.getElementById('<%= ddl.ClientID %>').style.display = type ? "inline" : "none"; } </script> 七楼的,我要实现的不是那样的效果啊,我鼠标点在TEXTBOX框中,DROPDOWNLIST出来并可以选择, js 写,onfocus 和onblur事件 四楼的可以function hide(){//类似代码document.getElementById("ddl").stytle="none";//}function show(){//类似代码document.getElementById("ddl").stytle="";//} vs 解决方案中,如何更改其下的项目的文件夹的名字? asp.net的自定义控件添加事件问题 不懂正则真是老火 关于.net上传空间问题 在“ASP.NET WEB应用程序”工具箱里没有树型控件呀,怎么加入? 已经添加了引用,为什么还说没找到? 如何获取到sheet中已经插入数据的最大行数 求c#下非负整数的正则表达式,在线等。 如何禁止页面刷新是自动触发某个按扭Click事件 mht文件打开乱码 asp.net发布该如何 配置虚拟目录 请问VS08的AJAX问题
if(DropDownlist1.visible)
{
DropDownlist1.visible=false;
}
else
{
....
}
function hide()
{
//类似代码
document.getElementById("ddl").stytle="";//
}function show()
{
//类似代码
document.getElementById("ddl").stytle="";//
}
<asp:textbox id="txt" runat="server" onfocus="hide();" onblur="show();"></textbox>
<asp:dropdownList id="ddl" runat="server"></asp:dropdownlist>
<input type="text" onmouseover="showHideDropdown(true)" onmouseout="showHideDropdown(false)" />
<br />
<asp:DropDownList ID="ddl" runat="server">
<asp:ListItem>a</asp:ListItem>
<asp:ListItem>b</asp:ListItem>
</asp:DropDownList>
</form>
<script type="text/javascript">
function showHideDropdown(type) {
document.getElementById('<%= ddl.ClientID %>').style.display = type ? "inline" : "none";
}
</script>
function hide()
{
//类似代码
document.getElementById("ddl").stytle="none";//
}function show()
{
//类似代码
document.getElementById("ddl").stytle="";//
}