Get element height
ScrollWidth//Displays the width of the current element
ScrollHeight//Displays the height of the current element
ScrollLeft//Displays the distance to the left of the current element's left margin
ScrollTop//Displays the height of the top of the current element at the top
Window.innerheight-Interior height of the browser window
Window.innerwidth-Interior width of the browser window
For Internet Explorer 8, 7, 6, 5:
Document.documentElement.clientHeight
Document.documentElement.clientWidth
Or
Document.body.clientHeight
Document.body.clientWidth
Screen.availwidth-Available screen widths
Screen.availheight-The available screen height
Returns the name of the current host
Location.hostname returns the domain name of the web host
Location.pathname returns the path and file name of the current page
Location.port returns the port of the web host (80 or 443)
Location.protocol returns the Web protocol used (HTTP///https://)
Open a window: JS can also be implemented
window.open ()-Open a new window
Window.close ()-Close the current window
Window.moveto ()-Move the current window
Window.resizeto ()-Adjusts the current window's
These tags can get the height and width of the current Div. And the implementation opens in a new window or in the current window.
Data type of JS
A string (string), a number, a Boolean (Boolean), an array, an object (objects), null (NULL), undefined (Undefined).
JavaScript objects
<p id= "Demo" ></p>
<script>
var person = {
FirstName: "John",
LastName: "Doe",
id:5566
};
document.getElementById ("Demo"). InnerHTML =
Person.firstname + "" + person.lastname;
</script>
Creates an object that can be used globally to get the value inside.
div self height, screen height