Location JavaScript Tutorial

The port property represents the port portion of the URL. This normally follows the hostname, but is not always available.
http://www.rntsoft.com:8080/index.htm, the port is equal to 8080.


    
     Using the port property of the Location object
    
    
    
    
    
    
    Click the button to get the current location.port value of the following address:
    

    http://www.rntsoft.com