javascript - how can I get the full url of a href attribute? -


<a id="next" href="/housing/__1_0_0_0_1_0_0/">next page</a> 

when put mouse on href value, there a link full url "http://esf.zs.fang.com/housing/__1_0_0_0_1_0_0/"

how can full url instead of relative url?

i used xpath("//a/@href"),but gets relative url "/housing/__1_0_0_0_1_0_0/"

any appreciated!

window.location can give want know current browser location, use compose qualified url.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -