javascript port attribute


  Translation results:

英[pɔ:t] US[pɔ:rt]

n.Port; (the meaning of things); (the interface between computers and other equipment); (of ships, airplanes, etc.) Port side

vt.raise gun; hold gun; turn left rudder

vi.Turn to port

adj .Port side, left side

vt.& vi.Turn the rudder (to the left), turn the (rudder) to the left

adv .To port, to the left

Plural: ports

javascript port attributesyntax

Function: Set or return the port part of the current URL.

Syntax: location.port=portnumber

javascript port attributeexample

<html>
<head>
    <meta charset="UTF-8">
</head>

<body>


<script type="text/javascript">
    document.write(location.port);
</script>


</body>
</html>

Run instance »

Click the "Run instance" button to view the online instance

Popular Recommendations

Home

Videos

Q&A