select 使用

来源:互联网 发布:最优化导论中文版 编辑:程序博客网 时间:2024/04/24 17:50
<html><head>    <script type="text/javascript">        function EE(obj) {            alert("value:" + obj.value + "name:" + obj.options[obj.selectedIndex].text);        }    </script></head><body><select name="selecttest" onchange="EE(this)">    <option value="1">第一项</option>    <option value="2">第二项</option>    <option value="3">第三项</option></select></body></html> 

原创粉丝点击