In JavaScript, is there any class equivalent for
With such class, I want to:
James Padolsey had tackled this problem.
In a nutshell, you can create an anchor element using document.createElement()
, and several of its native properties are then easily accessible, such as protocol
, port
, and hostname
.
For more information: http://james.padolsey.com/javascript/parsing-urls-with-the-dom/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With