加一个反扛跳转一下不就可以吗?<script>
var a="fdsafdsa<select>......</select>fdsafdasfdsaf";
alert(a.replace(/<select>.*<\/select>/i,"<此处内容被替换掉了>"));
</script>

解决方案 »

  1.   

    問題是我不知道<td>里是什么內﹐select我只是舉例而已
      

  2.   

    <script>
    a = "﹕<td><select>......</select></td>";
    alert(a.replace(/(.*<td[^<]*>)(.+)(<\/td>.*)/,"$1新内容$3"));
    </script>
    正则表达式 /(.*<td[^<]*>)(.+)(<\/td>.*)/
    其中:
    (.*<td[^<]*>) 匹配标记<td>及以前的东西包括td的属性部分 $1
    (<\/td>.*) 匹配标记</td> $3
    (.+) 匹配<td></td>间的内容 $2
    $i为被()括起部分的匹配内容,按括号顺序td间的内容可能是不确定的
      

  3.   

    /<select>......<\/select>/i