如何从URL获取片段标识符(value after hash #)?
例:
www.site.com/index.php#hello使用jQuery,我想将值hello放在变量中:
var type = …回答:
不需要jQuery
var type = window.location.hash.substr(1);以上是 如何从URL获取片段标识符(value after hash #)? 的全部内容, 来源链接: utcz.com/qa/414594.html
例:
www.site.com/index.php#hello使用jQuery,我想将值hello放在变量中:
var type = …不需要jQuery
var type = window.location.hash.substr(1);以上是 如何从URL获取片段标识符(value after hash #)? 的全部内容, 来源链接: utcz.com/qa/414594.html