<select name="select" class="STYLE4">
              <?php
foreach (glob("*.txt") as $filename) {?>
              <option value="<?php echo $filename ?>" name="<?php echo $filename ?>">
                <?php echo $filename ?></option>
              <?php
}
?>
            </select> <a href="/<?php echo $filename ?>" target="_blank">DOWNLOAD</a>上面这个select怎么关联到下面这个了。

解决方案 »

  1.   

    <select name="select" class="STYLE4">
    这个可能要弄一个什么事件下去。
      

  2.   

    你是要把选中的值放到a标签的href中?
      

  3.   

    <a href="" id="download" target="_blank">DOWNLOAD</a> //为a标签取个id
    <select name="select" class="STYLE4" onchange="document.getElementById('download').href=this.value;">
      

  4.   

    第一次,或刷新后,它DOWNLOAD是连接到网站。
      

  5.   

    非常感谢你啊。上次的PHP问题也是你回答的。
      

  6.   

    你要为它加个默认值。 当select框变化时才会触发那个脚本。