<select name="typeId" style="width:80" onchange="alert(this.options[this.selectedIndex].text)">

解决方案 »

  1.   

    同意楼上的,一般采用url参数传递的方法去获得select的selectedIndex属性,保存在一个文本框中,那么下一次提交,你再次获取这个属性就可以和这个文本框里的value进行比较了。
      

  2.   

    <select name="typeId" style="width=80" onchange="javascript:foo(this)">
    <option value="1">政法</option>
    <option value="2">经济建设</option>
    <option value="3">科教文卫</option>
    <option value="4" selected="selected">侨务</option>
    <option value="5">其他</option>
    </select>
    <script language=javascript>
    var history_selected_value = typeId.options[typeId.selectedIndex].value;
    function foo(args){
      if(typeId.options[typeId.selectedIndex].value!=history_selected_value)
      {
        alert("changed");
      }}
    </script>