Javascript 显示所选项目的提示及其内容';s值
我想创建一个Javascript 显示所选项目的提示及其内容';s值,javascript,html,css,Javascript,Html,Css,我想创建一个select控件,该控件将显示法规编号 然而,对于标准用户来说,仅数字并不意味着什么(另一方面,如果我创建selectcontrol,其中包含这些雕像的文本,那么它将完全不可读) 我想显示带有提示的div,提示将出现在所选项目的鼠标上方。但老实说,我有一些问题 这是我的选择控件: <select name="dropdn" class="mydpdn"> <option title='Some description for the ASX-1/1'>
select
控件,该控件将显示法规编号
然而,对于标准用户来说,仅数字并不意味着什么(另一方面,如果我创建select
control,其中包含这些雕像的文本,那么它将完全不可读)
我想显示带有提示的div
,提示将出现在所选项目的鼠标上方。但老实说,我有一些问题
这是我的选择控件
:
<select name="dropdn" class="mydpdn">
<option title='Some description for the ASX-1/1'>ASX-1/1</option>
<option title='Some description for the ASX-1/2'>ASX-1/2</option>
<option title='Some description for the ASX-1/3'>ASX-1/3</option>
<option title='Some description for the ASX-1/4'>ASX-1/4</option>
<option title='Some description for the ASX-1/5'>ASX-1/5</option>
<option title='Some description for the AED-1/1'>AED-1/1</option>
<option title='Some description for the AED-1/2'>AED-1/2</option>
<option title='Some description for the AED-1/3'>AED-1/3</option>
</select>
ASX-1/1
ASX-1/2
ASX-1/3
ASX-1/4
ASX-1/5
AED-1/1
AED-1/2
AED-1/3
Title
tag是我能想到的唯一方法。但是这个解决方案使hint
延迟出现,另外,我无法(或不知道如何)创建CSS
,使这个提示看起来更友好
有人能告诉我如何改进这段代码吗?您不能更改标题属性功能,因为它是浏览器的实现。你需要使用第三方工具提示之类的东西来解决你的问题。一个这样的插件是 您不能通过普通的CSS
设置标题的样式。您必须寻找javascript解决方案。