css simulation implements select drop-down box_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:56:19
Original
1010 people have browsed it





下拉框




请选择


<script><br> var $$ = function (id) {<br> return document.getElementById(id);<br>}<br>window.onload = function () {<br> var btnSelect = $$("btn_select");<br> var curSelect = btnSelect.getElementsByTagName("span")[0];<br> var oSelect = btnSelect.getElementsByTagName("select")[0];<br> var aOption = btnSelect.getElementsByTagName("option");<br> oSelect.onchange = function () {<br> var text=oSelect.options[oSelect.selectedIndex].text;<br> curSelect.innerHTML = text;<br> }<br>}<br></script>

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template