为TEXT写一个事件:
<input name='tt' onchange='ctt(this)'>
<select id='stt' ><script>
function ctt(itt) {
  for (i=0; i<document.stt.length; ++i) {
    if (document.stt.options[i].value == itt.value) {
      document.stt.selectedIndex = i;
      return;
    }
  }
}
<script>

解决方案 »

  1.   

    <html><head></head><body><form method="POST" action="--WEBBOT-SELF--">
      
      <p><input type="text" name="t1" size="20" onkeyup="d1.selectedIndex=this.value-1">
      <select size="1" name="d1">
        <option value=1>国家</option>
        <option value=2>省</option>
        <option value=3>县</option>
        <option value=4>镇</option>
      </select></p>
      
    </form></body></html>
      

  2.   

    <input onblur="if(value!='')sel.value = value">
    <select name=sel>
    <option value=1>国家
    <option value=2>省
    <option value=3>市
    <option value=4>县
    </select>
      

  3.   

    yswift(眼睛)你的代码有问题呀!