站长资源网络编程

『jQuery』取指定url格式及分割函数应用

整理:jimmy2026/8/6浏览2
简介复制代码 代码如下: 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