01.
<script type=
"text/javascript"
>
02.
<!--
03.
function
BwindowWidth()
04.
{
05.
if
(window.innerWidth)
return
window.innerWidth;
06.
else
if
(document.body && document.body.offsetWidth)
return
document.body.offsetWidth;
07.
else
return
0;
08.
}
09.
10.
function
BwindowHeight()
11.
{
12.
if
(window.innerHeight)
return
window.innerHeight;
13.
else
if
(document.body && document.body.offsetHeight)
return
document.body.offsetHeight;
14.
else
return
0;
15.
}
16.
17.
function
recal()
18.
{
19.
if
(Width != BwindowWidth() || Height != BwindowHeight())
20.
window.history.go(0);
21.
}
22.
23.
24.
if
(!window.Width && window.innerWidth)
25.
{
26.
window.onresize = recal;
27.
Width = BwindowWidth();
28.
Height = BwindowHeight();
29.
}
30.
31.
32.
</script>
33.
34.
35.
<script type=
"text/JavaScript"
>
36.
<!--
37.
38.
if
(!window.Width && document.body && document.body.offsetWidth)
39.
{
40.
window.onresize = recal;
41.
Width = BwindowWidth();
42.
Height = BwindowHeight();
43.
}
44.
45.
</script>
46.
47.
<script type=
"text/javascript"
>
48.
<!--
49.
document.write(
"หน้านี้มีขนาด "
+Width +
" X "
+Height);
50.
51.
52.
53.
</script>
54.
55.
<img src=
"img/chart.png"
width=
" Width "
>