将网址url中的参数转化为JSON格式的两种方法
在我们进入主题前,我先先看下获取网址URL的方法: window.location.href // 设置或获取整个URL为字符串 window.location.hash // 设置或获取hre ...
在我们进入主题前,我先先看下获取网址URL的方法: window.location.href // 设置或获取整个URL为字符串 window.location.hash // 设置或获取hre ...
获取当前: 百度为例: split() 方法用于把一个字符串分割成字符串数组。 先用split('?')把URL和参数分离: ...