Javascript Grammer Checking
Could someone kindly correct my javascript work?
<!DOCTYPE html>
<html>
<body>
</body>
<script>
function myFunction()
if (screen.width 800 =>) {
alert(".");
var redirect=confirm("You are on the mobile site. Would you like to
visit our full site instead?");
if (redirect == true) {
window.location.href = 'http://TEXTHIDDEN.com/';
}
else {
return true;
}
</script>
</html>
<center><h2> Hi there. Sorry, but the TEXT HIDDEN mobile site isnt ready
yet. </h2>
<h2> If you are not on a mobile device or portable </h2>
<h2> gaming console, press on the button below. Thank You. </h2>
My aim: If a user visits the mobile version of my site, it will prompt
them to go to the desktop page, if they are using a pc or high-res tabet
(width 800+).
Thanks
No comments:
Post a Comment