This Tutorial Has Been Viewed 1,802 Times.
This script helps you to find screen resolution of a client or user and redirect to a webpage using simple
<script LANGUAGE="JavaScript">
function resolution_finder() {
var url640x480 = "http://www.yahoo.com";
var url800x600 = "http://www.googl.com";
var url1024x768 = "http://www.msn.com";
if ((screen.width == 640) && (screen.height == 480))
window.location.href= url640x480;
else if ((screen.width == 800) && (screen.height == 600))
window.location.href= url800x600;
else if ((screen.width == 1024) && (screen.height == 768))
window.location.href= url1024x768;
else window.location.href= url640x480;
}
</script>
The HTML source
<center> <form> <input type=button value="Click Me And Redirect" onClick="resolution_finder()"/> </form> </center>
You will also be interested in ,
- Detect browser and redirect using javascript
- Displaying Text from User On Your Webpage
- A single link that cycles through several webpage background color using javascript
- HTTP referrer using javascript
- Fade in Fade out effect using simple jquery
- Auto refresh page with timer using javascript
- Javascript webpage load timer, display time taken to load a webpage
- Disabling right click menu using javascript
- Words Validation with Javascript
- Disabling right click menu using javascript Enhanced Version
Categories: JavaScripts, scripts