Search - Articles
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Tuesday, March 03, 2009
Dev Articles
Search Directory
SQL Server

How to get current resolution of your windows using Java Script in ASP.Net (Part17)

Author: DevASP
Download Source Code :

In this simple article you will learn that how can you get current resolution of your windows.

Simply create a application and open its HTML section and write in the head section


<script language="JavaScript">


      var scwidth=screen.width

      var scheight=screen.height

      function show_resolutionX()


        alert("screen width=" + scwidth)


      function show_resolutionY()


        alert("screen height=" + scheight)



Now write code for in body of the program

<form id="Form1" method="post" runat="server">


<input id=button1 type=button onclick= show_resolutionX() value="Check Screen X Resolution" />br>br>br>


<input id=button2 type=button onclick= show_resolutionY() value="Check Screen Y Resolution" />



Now when you change your resolution it tells you the current resolution.

Add Article Comment:
Name :
Email Address :
Comments :
<< Display Dynamic Current Date And Time in the Title Bar of Web Page

Disclaimer - Privacy
© 2002-2017