|
↑
User Details >>>
When users visit your page, JavaScript will determine their screen's resolution and redirect them to the page of your site that you wrote for that screen size!
NOTE: There are no valid URL's to redirect to, you'll need to put some in.
Add the below code to the <body> section of your page:
<script
language="javascript"
type="text/javascript">
function
redirectPage()
{
var
url640x480 =
"http://www.yoursite.com/640x480";
var
url800x600 =
"http://www.yoursite.com/800x600";
var
url1024x768 =
"http://www.yoursite.com/1024x768";
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>
<form>
<input
type=button
value="Enter!"
onClick="redirectPage()">
</form>
|
→ online casino canada
|