Friday, January 23, 2015

Screen Height & Width Button Creating

By this post you can know how to create Screen Height and Width Button by Java Script. You can set it on any web page. By setting this, anybody can know your Screen Width & Height. The demo is given below:

This is this demo of Screen Width.

This is the Screen Width of Java Script.

Know Your Screen Width

It is made of Java Script.


You can also set this Height & Screen Button on Blogger Page. For this you have to configure the page setting.

 On the blogger page you can see 'Option'.  Click on Option and
you can see '
Page Setting for Creating Height & Screen Button
Page Setting for Creating Height & Screen Button


On the mode of HTML, you will have to set the following Java Script. After setting this, when you click on the mode of 'Compose', you can see nothing. Don't worry at this. Then you give your post or update and all is done!

This is the Java Script of Screen Height

<head>
<script>
function myFunction() {
    document.getElementById("10001").innerHTML =
"Screen height is " + screen.height;
}
</script>
</head>

<body>

<h1>
Know Your Screen Height</h1>
<div id="10001">
It is made of Java Script.</div>
<button onclick="myFunction()" type="button">Click Here</button>

</body>
</html>



This is the Screen Width of Java Script.



<html>
<head>
<script>
function myFunction() {
document.getElementById("10002").innerHTML =
"Screen width is " + screen.width;
}
</script>
</head>

<body>

<h1>
Know Your Screen Width</h1>
<div id="10002">
It is made of Java Script.</div>
<button onclick="myFunction()" type="button">Click Here</button>

</body>



*In the Java Script you can change the green colored writings.



Contact

Name

Email *

Message *