dim str_arr,str_value
str_value="C:\Documents and Settings\Administrator\My Documents\My Pictures\白马山\a.jpg"
str_arr=split(str_value,"\")
response.write str_arr(Ubound)

解决方案 »

  1.   

    if(str.indexOf("\")!=-1)
    {
    var strss = str.substr(6)

    }
      

  2.   

    str_value="C:\Documents and Settings\Administrator\My Documents\My Pictures\白马山\a.jpg"
    str_arr=split(str_value,"\")
    for i=0 to ubound(str_arr)
    aaa=str_arr[i]
    next
      

  3.   

    <SCRIPT LANGUAGE="JavaScript">
    <!--
    var a =  "C:\\Documents and Settings\\Administrator\\My Documents\\My Pictures\\白马山\\a.jpg"if(a.lastIndexOf("\\")>=0)
    {
    alert(a.substr(a.lastIndexOf("\\")+1))
    }
    //-->
    </SCRIPT>
      

  4.   

    $str=explode(".","C:\Documents and Settings\Administrator\My Documents\My Pictures\白马山\a.jpg");
    echo $str[1];dim a;
    a=split("C:\Documents and Settings\Administrator\My Documents\My Pictures\白马山\a.jpg",".");
    response.write a(1)
    String str="C:\Documents and Settings\Administrator\My Documents\My Pictures\白马山\a.jpg";
    String va=str.split(".");
    System.out.println(va[1]);
      

  5.   

    开头写错了
    var para = aaa.split("\\");
    alert(para[6]);
      

  6.   

    var str = aaa.split("\\");
    alert(str[str.length - 1]);