<html>
<head>
<title> Using the port property of the Location object</title>
</head>
<body>
<script language="JavaScript">
<!--
function show(){
alert(document.location.port);
}
-->
</script>
<form name="form1">
Click the button to get the current location.port value of the following address:
<br>
http://www.java2java.com
<br>
<input type="button" name="getport" value="Get port" onClick='show()'>
<br>
</form>
</body>
</html>
|