This Tutorial Has Been Viewed 1,802 Times.
VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)

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>
VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)



coded by nessus
Categories: JavaScripts, scripts

Leave a Reply