Getting Page Port from URL in JavaScript

Note: If the port number is default (80 for http and 443 for https), most browsers will display 0 or nothing.

URL will display here