不太明白你的意思,你是指地址栏的还是指用户填写的内容

解决方案 »

  1.   

    <html> 
    <head> 
    <meta http-equiv="Content-Language" content="ja"> 
    <meta http-equiv="Content-Type" content="text/html; charset=shift_jis"> 
    <title>text</title> 
    </head> 
    <script>
    var reg=/(https?:\/\/\S+)/gi
    function Replace()
    {
      var ta=document.getElementById("ta");
      ta.value=ta.value.replace(reg,"http://www.yi13.cn/tu?url=$1");
    }
    </script>
    <body> 
    <textarea style="width:200px;height:120px" id="ta"></textarea><br/>
    <input type='button' value='ClickMe' onclick='Replace()'/>
    </body> 
    </html>