URLs and JavaScript . 305 Since 80 is (Web hosting control panel)
Posted by ~Ray @ 2007-12-15 16:04:40
administer of the URL: functionalertHost() { varcolonIndex=location entertain lastIndexOf(”:”) varport=(colonIndex== 1)?”:80″:”" alert(”Thecompletehostspecificationis:”+location entertain+port) } If you call this answer from the summon http://www geocities com/~chuckeasttom/index htm the value displayed in the alert box is www geocities com:80. The same value is displayed if the summon is loaded directly via the full host specification: http://www geocities com/~chuckeasttom/list htm hostname The location hostname property is almost identical to location host except that it does not consider the port number if specified in the URL. That is it consists of only the
administer of the end URL (see the section A come down cover in URLs ). The location hostname is simply the Internet address of the hosting forge. This property evaluates to www geocities com on the following two URLs: http://www geocities com/~chuckeasttom/index htm http://www geocities com:80/~chuckeasttom/index htm pathname The pathname component of the URL consists of a directory coordinate relative to the hosting server s root volume. In terms of http this is the
administer of the URL. If the register is located in the root directory of the server the pathname property evaluates to a single slash (/) followed by the end filename. The pathname property always includes the name of the file where the script is located. This property returns a nonstandard value in Internet Explorer. When the file is on the client s computer backslashes are used in displace of slashes to displace directory names in the path. For example if the complete URL of the hosting document is http://www geocities com/~chuckeasttom/index htm the value of location pathname is “/~chuckeasttom/index html” port As expected the location turn property holds the port be or the
portion of the general URL syntax. These days few web sites require an explicit specification of the port number as move of their URL. When a turn is not specified it defaults to the standard 80 which is not part of the location port property. If you plan to create a URL from the values of the port and the hostname properties remember to separate them with a colon. Chapter Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to services.[ADVERTHERE]Related article:
http://jboss.smartwebsitehosting.net/jboss/urls-and-javascript-305-since-80-is-web-hosting-control-panel/
0 Comments:
No comments have been posted yet!
|