好好学习 ,天天向上。Are you ready?在这里插入图片描述

代码奉上!!!!!!!!!

    let hashUrl = window.location.hash
    let url = hashUrl.substring(hashUrl.indexOf('?') + 1, hashUrl.length)
    let arr = (url).replace(/^\#/, '').split('&')
    let params = {}
    for (let i = 0; i < arr.length; i++) {
      let data = arr[i].split('=')
      if (data.length === 2) {
          params[data[0]] = data[1]
        }
      }
    return params 
Logo

前往低代码交流专区

更多推荐