IE6中下拉菜单的工具提示 [英] Tool Tip for dropdown in IE6

查看:74
本文介绍了IE6中下拉菜单的工具提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个包含项目列表的下拉列表
每当我选择任何项目时,我都需要在列出的项目上获得工具提示",

以下是我编写的代码,该代码适用于Internet Explorer 7.0
不适用于IE 6.0,
请给我发送Internet exp 6.0的代码.

Hi,
i have a drop down list with list of items
when ever i select any item i need to get TOOL TIP on that listed items,

below is the code which i have written this is working for internet explorer 7.0
not working for IE 6.0,
please can u send the code for internet exp 6.0.

for (int i = 0; i < ddl Country.Items.Count; i++)
ddl Country.Items.Attributes.Add("title", ddl Country.Items.Text);

推荐答案

DropDownLists上的工具提示存在很多困惑.这是事实.

Windows的IE不支持Tooltip属性,甚至不支持< select>上的title属性.控制.这是因为它们为< select>创建了一个单独的窗口.标签位于浏览器窗口上其余信息的上方. (将其视为另一层.)工具提示引擎实际上位于主窗口层上,因此工具提示将显示在< select>之后.元素(如果要显示).该分层行为还破坏了位于< select>上方的弹出窗口.标签,因为它们始终在主窗口层上!

W3C规范完全支持title =属性,Mozilla,FireFox,Netscape和Safari等基于DOM的浏览器都使用该规范.因此,通过分配myDropDownList.Attributes.Add("title","text"),您将在这些浏览器上获得工具提示!

最后,仅当用户未指向< select>时,才建议使用属性将<DropDownList括在<em class="showen"></em></blockquote> <blockquote class="en">There is a lot of confusion about tooltips on DropDownLists. Here''s the facts.<br /> <br /> IE for Windows does not support the Tooltip property or even the title attribute on the <select> control. This is because they create a separate window for the <select> tag that is above the rest of the info on the browser window. (Think of it as another layer.) The tooltip engine is actually on the main window layer, so the tooltip would appear behind the <select> element if it was to appear. This layered behavior also breaks popups that position over <select> tags because they are always on the main window layer!<br /> <br /> The title= attribute is fully supported in the W3C specification, which is used by the DOM-based browsers like Mozilla, FireFox, Netscape, and Safari. So by assigning myDropDownList.Attributes.Add("title", "text"), you will get a tooltip on those browsers!<br /> <br /> Finally, the suggestion to enclose the DropDownList in the </blockquote> <div class="cn">中.元素本身,因为存在分层问题.<br/> <br/> 我们只能希望Microsoft将< select>标记在将来版本的IE中放入同一层... <br/> <br/> <b>贷方到<a href="http://forums.asp.net/p/903935/994720.aspx"> PLBlum </a> </b <em class="showen"></em></div> <div class="en"> with a title= attribute will only work so long as the user does not point to the <select> element itself because of the layering problem.<br /> <br /> We can only hope Microsoft puts <select> tags into the same layer in a future version of IE... <br /> <br /> <b>Credit goes to PLBlum</b</div> <p class="cn"> <br/> </p> <blockquote class="cn">此处是服务器端代码,与任何浏览器无关.问题(如果有的话)是在生成的html中.<em class="showen"></em></blockquote> <blockquote class="en">This is server-side code and has nothing to do with any browser. The problem, if any, is in the html that is generated.</blockquote> <p class="cn"> <br/> </p> <p>这篇关于IE6中下拉菜单的工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!</p> </div> <div class="arc-body-main-more"> <span onclick="unlockarc('1423208');">查看全文</span> </div> </div> <div> </div> <div class="wwads-cn wwads-horizontal" data-id="166" style="max-width:100%;border: 4px solid #666;"></div> </div> </article> <div id="arc-ad-2" class="mb-1"> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5038752844014834" crossorigin="anonymous"></script> <ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-5038752844014834" data-ad-slot="3921941283"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <div class="widget bgwhite radius-1 mb-1 shadow widget-rel"> <h5>相关文章</h5> <ul> <li> <a target="_blank" title="如何阻止IE6下拉菜单" href="/579514.html"> 如何阻止IE6下拉菜单; </a> </li> <li> <a target="_blank" title="下拉菜单的工具提示" href="/1424864.html"> 下拉菜单的工具提示; </a> </li> <li> <a target="_blank" title="使用与ie6兼容的css的水平下拉菜单" href="/1216799.html"> 使用与ie6兼容的css的水平下拉菜单; </a> </li> <li> <a target="_blank" title="下拉列表项的工具提示出现在IE6中." href="/1429996.html"> 下拉列表项的工具提示出现在IE6中.; </a> </li> <li> <a target="_blank" title="如何使下拉菜单出现在IE6的组合框?" href="/535264.html"> 如何使下拉菜单出现在IE6的组合框?; </a> </li> <li> <a target="_blank" title="Superfish下拉菜单,如何在ie6和ie7中修复z-index?" href="/1812700.html"> Superfish下拉菜单,如何在ie6和ie7中修复z-index?; </a> </li> <li> <a target="_blank" title="Bootstrap在下拉菜单中添加工具提示" href="/2224522.html"> Bootstrap在下拉菜单中添加工具提示; </a> </li> <li> <a target="_blank" title="在visual c ++中下拉菜单" href="/1302112.html"> 在visual c ++中下拉菜单; </a> </li> <li> <a target="_blank" title="下拉列表未在IE6中显示" href="/1421189.html"> 下拉列表未在IE6中显示; </a> </li> <li> <a target="_blank" title="在IE6中下载Javascript生成的XML" href="/1106373.html"> 在IE6中下载Javascript生成的XML; </a> </li> <li> <a target="_blank" title="下拉菜单中的下拉菜单" href="/2057915.html"> 下拉菜单中的下拉菜单; </a> </li> <li> <a target="_blank" title="IE6 CSS悬停问题菜单" href="/567792.html"> IE6 CSS悬停问题菜单; </a> </li> <li> <a target="_blank" title="IE6 CSS 悬停菜单问题" href="/2857092.html"> IE6 CSS 悬停菜单问题; </a> </li> <li> <a target="_blank" title="Angular 6的Bootstrap下拉菜单" href="/1679605.html"> Angular 6的Bootstrap下拉菜单; </a> </li> <li> <a target="_blank" title="引导下拉菜单中下拉切换类的目的是什么?" href="/2776907.html"> 引导下拉菜单中下拉切换类的目的是什么?; </a> </li> <li> <a target="_blank" title="如何更改 AutoCompleteTextView 中下拉菜单的文本颜色?" href="/2624221.html"> 如何更改 AutoCompleteTextView 中下拉菜单的文本颜色?; </a> </li> <li> <a target="_blank" title="如何获取ReactJS中下拉菜单的选定值" href="/656699.html"> 如何获取ReactJS中下拉菜单的选定值; </a> </li> <li> <a target="_blank" title="WPF工具栏中的下拉菜单" href="/1617998.html"> WPF工具栏中的下拉菜单; </a> </li> <li> <a target="_blank" title="WPF 工具栏中的下拉菜单" href="/2776665.html"> WPF 工具栏中的下拉菜单; </a> </li> <li> <a target="_blank" title="IE 7 CSS下拉菜单的麻烦" href="/577075.html"> IE 7 CSS下拉菜单的麻烦; </a> </li> <li> <a target="_blank" title="用于在工具提示中显示所选项目下拉菜单的JavaScript" href="/1183766.html"> 用于在工具提示中显示所选项目下拉菜单的JavaScript; </a> </li> <li> <a target="_blank" title="带有 Angular 6 的 Bootstrap 下拉菜单" href="/2710636.html"> 带有 Angular 6 的 Bootstrap 下拉菜单; </a> </li> <li> <a target="_blank" title="CSS下拉菜单无法在IE中运行" href="/1035558.html"> CSS下拉菜单无法在IE中运行; </a> </li> <li> <a target="_blank" title="实现:在“if”中下拉菜单声明不起作用" href="/863655.html"> 实现:在“if”中下拉菜单声明不起作用; </a> </li> <li> <a target="_blank" title="Kendo Grid 在 Bootstrap 下拉菜单或工具提示中表现不佳" href="/2767363.html"> Kendo Grid 在 Bootstrap 下拉菜单或工具提示中表现不佳; </a> </li> </ul> </div> <div class="mb-1"> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5038752844014834" crossorigin="anonymous"></script> <ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-5038752844014834" data-ad-slot="3921941283"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> <div class="side"> <div class="widget widget-side bgwhite mb-1 shadow"> <h5>其他开发语言最新文章</h5> <ul> <li> <a target="_blank" title="成功安排的软件保护服务,以便重新启动:原因:RulesEngine。" href="/1218923.html"> 成功安排的软件保护服务,以便重新启动:原因:RulesEngine。; </a> </li> <li> <a target="_blank" title="如何解决“我们很抱歉......”但您的计算机或网络可能正在发送自动查询。为了保护我们的用户,我们目前无法处理您的请求。“" href="/1094282.html"> 如何解决“我们很抱歉......”但您的计算机或网络可能正在发送自动查询。为了保护我们的用户,我们目前无法处理您的请求。“; </a> </li> <li> <a target="_blank" title="golang无效操作:type interface {}不支持索引" href="/809967.html"> golang无效操作:type interface {}不支持索引; </a> </li> <li> <a target="_blank" title="如何在Visual Studio 2019中创建EXE文件" href="/1220354.html"> 如何在Visual Studio 2019中创建EXE文件; </a> </li> <li> <a target="_blank" title="关于“Add-AppxPackage”的问题powershell命令" href="/1287760.html"> 关于“Add-AppxPackage”的问题powershell命令; </a> </li> <li> <a target="_blank" title="Windows x64 RabbitMQ安装错误与Erlang环境var(ERLANG_HOME)" href="/687938.html"> Windows x64 RabbitMQ安装错误与Erlang环境var(ERLANG_HOME); </a> </li> <li> <a target="_blank" title="CMAKE_C_COMPILER不是现有编译器工具的完整路径" href="/782789.html"> CMAKE_C_COMPILER不是现有编译器工具的完整路径; </a> </li> <li> <a target="_blank" title="在Go中将float64转换为int" href="/808359.html"> 在Go中将float64转换为int; </a> </li> <li> <a target="_blank" title="显示设置 - 屏幕分辨率 - 无法从远程会话更改" href="/1226298.html"> 显示设置 - 屏幕分辨率 - 无法从远程会话更改; </a> </li> <li> <a target="_blank" title="使用Twitter登录时出错" href="/1411071.html"> 使用Twitter登录时出错; </a> </li> </ul> </div> <div class="widget widget-side bgwhite mb-1 shadow"> <h5> 热门教程 </h5> <ul> <li> <a target="_blank" title="Java教程" href="/OnLineTutorial/java/index.html"> Java教程 </a> </li> <li> <a target="_blank" title="Apache ANT 教程" href="/OnLineTutorial/ant/index.html"> Apache ANT 教程 </a> </li> <li> <a target="_blank" title="Kali Linux教程" href="/OnLineTutorial/kali_linux/index.html"> Kali Linux教程 </a> </li> <li> <a target="_blank" title="JavaScript教程" href="/OnLineTutorial/javascript/index.html"> JavaScript教程 </a> </li> <li> <a target="_blank" title="JavaFx教程" href="/OnLineTutorial/javafx/index.html"> JavaFx教程 </a> </li> <li> <a target="_blank" title="MFC 教程" href="/OnLineTutorial/mfc/index.html"> MFC 教程 </a> </li> <li> <a target="_blank" title="Apache HTTP客户端教程" href="/OnLineTutorial/apache_httpclient/index.html"> Apache HTTP客户端教程 </a> </li> <li> <a target="_blank" title="Microsoft Visio 教程" href="/OnLineTutorial/microsoft_visio/index.html"> Microsoft Visio 教程 </a> </li> </ul> </div> <div class="widget widget-side bgwhite mb-1 shadow"> <h5> 热门工具 </h5> <ul> <li> <a target="_blank" title="Java 在线工具" href="/Onlinetools/details/4"> Java 在线工具 </a> </li> <li> <a target="_blank" title="C(GCC) 在线工具" href="/Onlinetools/details/6"> C(GCC) 在线工具 </a> </li> <li> <a target="_blank" title="PHP 在线工具" href="/Onlinetools/details/8"> PHP 在线工具 </a> </li> <li> <a target="_blank" title="C# 在线工具" href="/Onlinetools/details/1"> C# 在线工具 </a> </li> <li> <a target="_blank" title="Python 在线工具" href="/Onlinetools/details/5"> Python 在线工具 </a> </li> <li> <a target="_blank" title="MySQL 在线工具" href="/Onlinetools/Dbdetails/33"> MySQL 在线工具 </a> </li> <li> <a target="_blank" title="VB.NET 在线工具" href="/Onlinetools/details/2"> VB.NET 在线工具 </a> </li> <li> <a target="_blank" title="Lua 在线工具" href="/Onlinetools/details/14"> Lua 在线工具 </a> </li> <li> <a target="_blank" title="Oracle 在线工具" href="/Onlinetools/Dbdetails/35"> Oracle 在线工具 </a> </li> <li> <a target="_blank" title="C++(GCC) 在线工具" href="/Onlinetools/details/7"> C++(GCC) 在线工具 </a> </li> <li> <a target="_blank" title="Go 在线工具" href="/Onlinetools/details/20"> Go 在线工具 </a> </li> <li> <a target="_blank" title="Fortran 在线工具" href="/Onlinetools/details/45"> Fortran 在线工具 </a> </li> </ul> </div> </div> </div> <script type="text/javascript">var eskeys = 'ie6,中,下拉菜单,的,工具,提示'; var cat = 'cc';';//%e5%85%b6%e4%bb%96%e5%bc%80%e5%8f%91%e8%af%ad%e8%a8%80</script> </div> <div id="pop" onclick="pophide();"> <div id="pop_body" onclick="event.stopPropagation();"> <h6 class="flex flex101"> 登录 <span onclick="pophide();">关闭</span> </h6> <div class="pd-1"> <div class="wxtip center"> <span>扫码关注<em>1秒</em>登录</span> </div> <div class="center"> <img id="qr" src="https://huajiakeji.com/Content/Images/qrydx.jpg" alt="" style="width:150px;height:150px;" /> </div> <div style="margin-top:10px;display:flex;justify-content: center;"> <input type="text" placeholder="输入验证码" id="txtcode" autocomplete="off" /> <input id="btngo" type="button" onclick="chk()" value="GO" /> </div> <div class="center" style="margin: 4px; font-size: .8rem; color: #f60;"> 发送“验证码”获取 <em style="padding: 0 .5rem;">|</em> <span style="color: #01a05c;">15天全站免登陆</span> </div> <div id="chkinfo" class="tip"></div> </div> </div> </div> <script type="text/javascript" src="https://lib.sinaapp.com/js/jquery/1.9.1/jquery-1.9.1.min.js"></script> <script type="text/javascript" src="https://cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.min.js"></script> <script type="text/javascript" src="https://img01.yuandaxia.cn/Scripts/highlight.min.js"></script> <script type="text/javascript" src="https://img01.yuandaxia.cn/Scripts/base.js?v=0.22"></script> <script type="text/javascript" src="https://img01.yuandaxia.cn/Scripts/tui.js?v=0.11"></script> <footer class="footer"> <div class="container"> <div class="flink mb-1"> 友情链接: <a href="https://www.it1352.com/" target="_blank">IT屋</a> <a href="https://huajiakeji.com/" target="_blank">Chrome插件</a> <a href="https://www.cnplugins.com/" target="_blank">谷歌浏览器插件</a> </div> <section class="copyright-section"> <a href="https://www.it1352.com" title="IT屋-程序员软件开发技术分享社区">IT屋</a> ©2016-2022 <a href="http://www.beian.miit.gov.cn/" target="_blank">琼ICP备2021000895号-1</a> <a href="/sitemap.html" target="_blank" title="站点地图">站点地图</a> <a href="/Home/Tags" target="_blank" title="站点标签">站点标签</a> <a target="_blank" alt="sitemap" href="/sitemap.xml">SiteMap</a> <a href="/1155981.html" title="IT屋-免责申明"><免责申明></a> 本站内容来源互联网,如果侵犯您的权益请联系我们删除. </section> <!--统计代码--> <script type="text/javascript"> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?0c3a090f7b3c4ad458ac1296cb5cc779"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> <script type="text/javascript"> (function () { var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </div> </footer> </body> </html>