- Home
- Categorie
- Coding e Sistemistica
- Javascript & Framework
- Dimensioni della finestra con FF
-
Dimensioni della finestra con FF
Ciao
provate un po'questo script
Ho appena installato FireFox 3.0.11 e mi da dei risultati assurdi<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD><BODY>
<script type="text/javascript">
var IE6vDoc=(document.compatMode && document.compatMode != "BackCompat")?1:0;
var w = (window.innerWidth)?window.innerWidth:
((IE6vDoc)?document.documentElement.clientWidth:
document.body.clientWidth);
var h = (window.innerHeight)?window.innerHeight:
((IE6vDoc)?document.documentElement.clientHeight:
document.body.clientHeight);
alert(screen.width);
alert(screen.availWidth);
alert(w);
alert(h);
</script>
</BODY>
</HTML>Safari a tutto schermo:
alert(screen.width);=1024
alert(screen.availWidth);=1024
alert(w);=1024
alert(h);641Opera :
alert(screen.width);=1024
alert(screen.availWidth);=1024
alert(w);=952
alert(h);=595MSIE 8 a tutto schermo:
alert(screen.width);=1024
alert(screen.availWidth);=1024
alert(w);=952
alert(h);=495FireFox 3.0.11
alert(screen.width);=1024
alert(screen.availWidth);=1024
alert(w);=1707
alert(h);=1052