首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >IE 6 DropDown工具提示

IE 6 DropDown工具提示
EN

Stack Overflow用户
提问于 2011-09-21 14:02:44
回答 2查看 812关注 0票数 0

我需要放置下拉选择框的工具提示IE6 only.The的要求是,我有宽度:150px的选择框,我有4个选项values.The文本里面的选项值是大于'150px‘,所以,它不显示在增加选择框的大小的选择box.Instead中的完整文本,我需要显示一个完整的工具提示与整个text.If任何人有任何想法,请帮助我。

EN

回答 2

Stack Overflow用户

发布于 2011-09-21 14:08:03

将不会有像dropdown.Any的IE6工具提示这样的选项,如果文本很长,我们可以增加下拉列表的宽度...使用Ajax工具包中的combobox,这样我就有了增加大小的默认属性。

代码语言:javascript
复制
<cc1:ComboBox Width="130px" ID="txtCPLegalNameValue" AutoPostBack="True"
              OnTextChanged="ddlName_Change"  AppendDataBoundItems="false"  
             runat="server" AutoCompleteMode="SuggestAppend" >    </cc1:ComboBox>
票数 0
EN

Stack Overflow用户

发布于 2011-09-21 14:09:15

这是与ASP.net下拉列表控件一起使用的代码

这段代码提供了下拉列表的工具提示。下拉列表可以设置为较小的宽度,并且工具提示将在下拉列表中显示该值。

****JavaScript Section__*******

代码语言:javascript
复制
<SCRIPT language="JavaScript">
<!--
showHideTooltip = function ()
{
var obj = document.getElementById("DropDownList1");
document.getElementById("tooltip").innerHTML =
obj.options[obj.selectedIndex].value;
if(event.type == "mouseleave")
{
document.getElementById("tooltip").style.display = "none";
}
else
{
document.getElementById("tooltip").style.display = "inline"
document.getElementById("tooltip").style.top = event.y;
document.getElementById("tooltip").style.left = event.x;
}
}
//-->
</SCRIPT>

aspx page__***********HTML部分

代码语言:javascript
复制
<form id="Form1" method="post" runat="server">
<SPAN id="tooltip" style="BORDER-RIGHT: #000000 1px solid; PADDING-RIGHT:
3px; BORDER-TOP: #000000 1px solid; DISPLAY: inline; PADDING-LEFT: 3px;
FONT-SIZE: 12px; PADDING-BOTTOM: 3px; BORDER-LEFT: #000000 1px solid;
PADDING-TOP: 3px; BORDER-BOTTOM: #000000 1px solid; FONT-FAMILY: Verdana;
POSITION: absolute; BACKGROUND-COLOR: #a6bed9">
</SPAN>
<aspropDownList id="DropDownList1" style="Z-INDEX: 101; LEFT: 104px;
POSITION: absolute; TOP: 160px"
runat="server" Width="80px" Height="24px">
<asp:ListItem Value="One" Selected="True">One</asp:ListItem>
<asp:ListItem Value="Two">Two</asp:ListItem>
<asp:ListItem
Value="Threeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeee">Threeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeee</asp:ListItem>
<asp:ListItem Value="Four">Four</asp:ListItem>
<asp:ListItem Value="Five">Five</asp:ListItem>
</aspropDownList>
</form>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7495234

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档