哪出错了~~~
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title></head><body>
<form id="form1" name="form1" method="post" action="">
  <select name="select1" size="3" onchange="change()">
    <option selected value="济南">济南</option>
    <option value="北京">北京</option>
    <option value="上海">上海</option>
  </select>
</form>
<script language="javascript">
function change()
{
alert("您选择的是:"+ select1.value);
}
</script>
</body>
</html>

解决方案 »

  1.   

    alert("您选择的是:"+ form1["select1"].value);
      

  2.   

    alert("您选择的是:"+ form1.select1.value); 
      

  3.   

    为么教程上没加form1都可以呢?
      

  4.   

    <%@LANGUAGE="JAVASCRIPT" CODEPAGE="936"%> 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml"> 
    <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
    <title>无标题文档 </title> </head> <body> 
    <!--<form id="form1" name="form1" method="post" action="">  -->
      <select name="select1" size="3" onchange="change()"> 
        <option selected value="济南">济南 </option> 
        <option value="北京">北京 </option> 
        <option value="上海">上海 </option> 
      </select> 
    <!--</form>  -->
    <script language="javascript"> 
    function change() 

    alert("您选择的是:"+ select1.value); 

    </script> 
    </body> 
    </html> 
      

  5.   

    <!--<form id="form1" name="form1" method="post" action="">  -->
      <select name="select1" size="3" onchange="change(this)"> 
        <option selected value="济南">济南 </option> 
        <option value="北京">北京 </option> 
        <option value="上海">上海 </option> 
      </select> 
    <!--</form>  -->
    <script language="javascript"> 
    function change(sel) 

    alert("您选择的是:"+ sel.value); 

    </script> 
      

  6.   

    先  select1= document.getElementById("form1")没那个对象 你怎么用他的value     哪个教程说不用的啊
      

  7.   

    alert("您选择的是:"+ form1.select1.value); !!!!