下拉框

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title> New Document </title>
  <meta http-equiv="Content-Type" content="text/html; charset=GBK" />
  <script type="text/javascript">
function change (){
var sel = document.getElementById('sel');
sel.options[0].value = 111;
sel.options[0].text = 111;
}
  </script>
 </head>
 <body>
  <select id="sel" style="width:100px;">
<option value="1">1</option>
  </select>
  <a href="javascript:change();">UPDATE</a>
 </body>
</html>javascript

相關文章
相關標籤/搜索