<% Function GetPage(url) dim Retrieval Set Retrieval = CreateObject("Microsoft.XMLHTTP") With Retrieval .Open "Get", url, False ', "", "" .Send GetPage = BytesToBstr(.ResponseBody) End With Set Retrieval = Nothing End Function Function BytesToBstr(body) dim objstream set objstream = Server.CreateObject("adodb.stream") objstream.Type = 1 objstream.Mode =3 obj...[ 查看全文 ]
其中主要是涉及到"\"在javascript中的特殊字符,是不是要用到正规表达式 script var m="D:\图片\丐帮.jpg" //求解 /script 希望能获取的值为"丐帮" 代码如下: script type="text/javascript" var s ="D:\\图片\\丐帮.jpg"; var t = s.match(/\\([^\\^.]+)\.[^\\]*$/)[1]; alert(t); /script [ 查看全文 ]