无法分配var i = window.location.href

时间:2018-02-04 15:36:28

标签: window.location

不知怎的,我不能分配

var i = window.location.href;

虽然这项工作

console.log(window.location.href);

我正在使用JQuery 3.3.1

1 个答案:

答案 0 :(得分:1)

它必须有效。

i = window.location.href

document.write( i )