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

复制代码 代码如下:

  var arr=location.href.split('/').pop().split('.');

  alert(arr[0]); //Parent

  alert(arr[1]); //Child