获得select内容而不是value值

<html>
<head>
<script>
function geturl(selurl)

   alert(selsite.options[selsite.selectedIndex].innerText);
    alert(selsite.options[selsite.selectedIndex].value);
}
</script>

<title>无标题文档</title>
</head>

<body>
<select name="selsite"style="width:120px" onchange="geturl(this)">
  <option value="http://www.qq.com" >www.QQ.com</option>
  <option value="http://rtx.tencent.com" >RTX腾讯通</option>
  <option value="http://im.qq.com/tm">腾讯TM</option>
      </select>
</body>
</html>
 

你可能感兴趣的:(html,function,腾讯,文档)