站长资源网络编程
『jQuery』取指定url格式及分割函数应用
简介复制代码 代码如下: var arr=location.href.split('/').pop().split('.'); alert(arr[0]); //Parent alert(arr[1]); //Child
复制代码 代码如下:
var arr=location.href.split('/').pop().split('.');
alert(arr[0]); //Parent
alert(arr[1]); //Child
var arr=location.href.split('/').pop().split('.');
alert(arr[0]); //Parent
alert(arr[1]); //Child