Home  >  Article  >  Web Front-end  >  火狐浏览器下连接a下无法使用select下拉菜单_html/css_WEB-ITnose

火狐浏览器下连接a下无法使用select下拉菜单_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:29:451366browse

火狐浏览器下连接a下无法使用select下拉菜单:
如果select下拉菜单包裹在链接a中,则无法实现选中效果,当然如此使用在实际应用中也是很少见的,不过下面还是做一下简单介绍,如何避免此种问题的出现,寄希望能够给需要者带来一定的帮助。
代码实例如下:

<!DOCTYPE html>     <html>     <head>     <meta charset=" utf-8">     <meta name="author" content="http://www.softwhy.com/" />     <title>蚂蚁部落</title> </head> <body> <a href="javascript:void(0)">  <select>     <option>蚂蚁部落一</option>     <option>蚂蚁部落二</option>     <option>蚂蚁部落三</option>     <option>蚂蚁部落四</option>   </select></a> </body> </html>

以上代码在火狐浏览器中第一次点击可以出现下拉菜单,但是点击第二次却不能够成功,当前还没有很好的办法,只要将链接a元素修改成span元素就好了。

原文地址是:http://www.softwhy.com/forum.php?mod=viewthread&tid=13586

更多内容可以参阅:http://www.softwhy.com/divcss/

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn