1#
转自:http://blog.cfxixi.com/post/2014/12/08/javascript%E5%A6%82%E4%BD%95%E6%88%AA%E5%8F%96url%E5%9C%B0%E5%9D%80%E4%B8%AD%E7%9A%84%E5%8F%82%E6%95%B0%E5%B9%B6%E4%BF%9D%E5%AD%98%E4%B8%BA%E5%8F%82%E6%95%B0.aspx
  1. var pairs = location.hash.slice(1).split('&&'), param = {};

  2.             pairs.forEach(function (pair) {

  3.                 pair = pair.split('=');

  4.                 param[pair[0]] = decodeURIComponent(pair[1] || '');

  5.             });

  6.             

  7.             param.goPage = param.goPage || "transferIndexView";

  8.             document.getElementById(param.goPage).style.display = "block";

复制代码