呵呵,楼主的本意不是这样的吧。他好像是说点击选择之后select显示的内容不变,就是说不管你选择哪个值,最后的值都是原始选择的哪个,不知道队不?
我也有同样一个问题,大家帮忙啊!

解决方案 »

  1.   

    不知为什么要这样,不可以用在修改了值之后再用javascript将值改回来不就可以了吗?
      

  2.   

    <select onchange="selectedIndex=1">
    <option>abc
    <option selected>def
    <option>ghi
    </select>
      

  3.   

    <select onchange="this.selectedIndex=1">
    <option>1</option>
    <option selected>2</option>
    <option>3</option>
    </select>
      

  4.   

    法1:
    <select onchange="this.selectedIndex=1">
    <option>1</option>
    <option selected>2</option>
    <option>3</option>
    </select>法2:
    <style>
    select{falcon:expression(selectedIndex=0)}
    </style>
    <select>
    <option>1</option>
    <option>2</option>
    </select>
    <select >
    <option>1</option>
    <option>2</option>
    </select>
    法3:
    <style>
    select.s1{falcon:expression(selectedIndex=0)}
    </style>
    <select class="s1">
    <option>1</option>
    <option>2</option>
    </select>
    <select >
    <option>1</option>
    <option>2</option>
    </select>
      

  5.   

    IE 6:
    <select onbeforeactivate="return false">
    <option>a
    <option selected>b
    <option>c
    </select>
      

  6.   

    给你一个经典站点,里面的ComboBox应该符合你的要求,解决了问题给分给我
    http://webfx.eae.net
      

  7.   

    推荐freefalcon(心宇) 的方法二和方法三,不推荐方法一。因为,在浏览器的Address栏中键入
    javascript:alert(document.getElementsByTagName("select")[0].selectedIndex=0);
    会使方法一失效。
    当然,也能使用相同的方法(键入其它命令)使方法二和方法三失效。我的笨方法是定时设置:
    <form name=thisform>
    <select name=sel>
    <option>1</option>
    <option>2</option>
    </select>
    </form>
    <script>
    setInterval("thisform.sel.selectedIndex=1", 100);
    </script>
      

  8.   

    <select onmouseover="this.setCapture()" onmouseout="this.releaseCapture()">
    <option>1</option>
    <option selected>2</option>
    <option>3</option>
    </select>OR<select onchange="selectedIndex=this.defaultChecked">
    <option>1</option>
    <option>2</option>
    <option>3</option>
    </select>
      

  9.   

    加一个<select onfocus="this.blur()" onmouseover="this.setCapture()" onmouseout="this.releaseCapture()">
      

  10.   

    对checkbox还好办:
    <input type=checkbox onfocus="this.blur()" onclick="checked=defaultChecked">对radio呢:
    <input type=radio name="test" onclick="event.returnValue=false" checked>
    <input type=radio name="test" onclick="event.returnValue=false">还没想到什么简单直捷的方法。对只要view的页面我是干脆不写name来实现readonly的,要是需要submit的页面我想就只好用脚本来维护选中状态了。
      

  11.   

    呵呵说明一下,<input type=radio name="test" onclick="event.returnValue=false" checked>
    中的onclick部分是错的。我还没想出对的写法。
      

  12.   

    试过了没用。好像只有不写name最有用。
      

  13.   

    嗯,需要submit的页面也可以不写name,用该name定义一个hidden来保存选中项的value就是了呵呵,又可以偷懒不写脚本了 :-P
      

  14.   

    象这样。把:
    <form ...>
    <input type=radio name=emu value=1>item1<BR>
    <input type=radio name=emu value=2 checked>item2<BR>
    <input type=radio name=emu value=3>item3<BR>
    </form>改为:
    <form ...>
    <input name=emu value=2 type=hidden>
    <input type=radio>item1<BR>
    <input type=radio checked>item2<BR>
    <input type=radio>item3<BR>
    </form>就成了
      

  15.   

    bencalie(Bencalie) 的第二种方法不错!
    很好!
      

  16.   

    <select disabled>
    <option>ksldfsl</option>
    </select>