This is a simple tutorial.. It will get the screen resolution and if you modify it a little bit you can use it to define how your website will be displayed like for example having to home pages then if the screen resolution is 1024x768 it will display index1.html and if the user has 800x600 it will display index2.html.. but then thats up to you in this tutorial I will keep it the simplest possible.
Solution:-
This goes between <head> tags:-
<script language="JavaScript">
function res()
{
alert('Screen Resolution Is '+screen.width+' by '+screen.height);
}
</script>
And this as the body code
<body onLoad='res()'
Explanation:-
Can it be simpler than that?
A Preview:-
None
Conclusion:-
As Always Feedback is welcome and the full source is attached!!


Sign In
Create Account



Back to top









