为什么js使用window.location.href和getAttribute('href')获取的地址不一样(E后面的符号),该怎么解决
那种可以用,就用那种了
getAttribute你属性里面有什么就是什么内容,a.href属性会将非法字符转为合法的url
getAttribute是输出属性内容,而window.location.href会把非法字符转为url格式