In JavaScript, for example, the URL is
document.location.href = "http://aaa.bbb.ccc.com/asdf/asdf/sadf.aspx?blah"
if you say
aaa.bbb.ccc.com
I just want to bring this part, what should I do?
Let me give you an example.
http://sub.domain.com/page.htm
If you have a URL like this
If you do window.location.host,
You will receive a sub.domain.com:8080 or sub.domain.com:80
value.
If you do window.location.hostname,
You will receive sub.domain.com
.
If you do window.location.protocol, you receive http:
and
If you do window.location.port, you will receive 8080 or 80
.
If you do window.location.origin, you will receive http://sub.domain.com *
.
© 2024 OneMinuteCode. All rights reserved.