Detect Window Screen Resolution
function CheckResolution()
{
if(screen.width<1180 || screen.height<924)
{
location.href('http://google.com');
}
else if (screen.width<800 || screen.height<600)
{
location.href('http://youtube.com');
}
else
{
location.href('http://yahoo.com');
}
}
{
if(screen.width<1180 || screen.height<924)
{
location.href('http://google.com');
}
else if (screen.width<800 || screen.height<600)
{
location.href('http://youtube.com');
}
else
{
location.href('http://yahoo.com');
}
}
put the above code between head section.
<head>Code here</head>
and call the CheckResolution function on the body on load.
<body onLoad="CheckResolution();">