function aa(bb)
aa=bb;
end function
调用的时候: bb="/up/img/1.gif"call aa(bb)

解决方案 »

  1.   

    function aa(bb,str)
    aa=left(bb,instrrev(bb,"/"))&str&right(bb,len(bb)-instrrev(bb,"/"))
    end functionresponse.write aa("/up/img/1.gif","lysanhu")
      

  2.   

    有点像批量改名。
    二楼正解!asp与vbscript相通。我作一个vbscript本地页面测试通过:========以下代码============<html>
    <head>
    <title>批量替换测试</title>
    </head><body><script language="vbscript">
    function aa(bb,str)
        aa=left(bb,instrrev(bb,"/")) & str & right(bb,len(bb) - instrrev(bb,"/"))
    end functiondocument.write(aa("/up/img/1.gif","lysanhu"))
    document.write("<p>")document.write(aa("/up/img/23.gif","lysanhu"))
    document.write("<p>")document.write(aa("/up/img/4_6.gif","lysanhu"))
    document.write("<p>")document.write(aa("/up/img/7%208.gif","lysanhu"))
    document.write("<p>")
    </script>
    </body>
    </html>
      

  3.   

    Click the link to solve your problem.Good luck!