/

HTML / CSS / JavaScript Tutorial

JavaScript Window property: name

[this page | pdf | back links]

The name property (of the JavaScript BOM window object) sets / returns the window name.

 

EXAMPLE:


HTML USED IN THIS EXAMPLE:
<!DOCTYPE html>
<html> <!-- Copyright (c) Nematrian Limited 2018 -->
<head></head>
<body>
Window name (set to "ThisWindow" in code):<br><b id="element">

<script>
window.name = "ThisWindow"
document.getElementById("element").innerHTML = window.name;
</script>

</body>
</html>


NAVIGATION LINKS
Contents | Prev | Next | JavaScript DOM (and BOM)


Desktop view | Switch to Mobile