| ÇØ»óµµ ã±â | Go source |
if ( self.screen ) { //nn4, ie4¿¡¼ »ç¿ë
if ( screen.width == 1024 ) self.location.href="version4-1024.htm";
else if ( screen.width == 800 ) self.location.href="version4-800.htm";
else self.location.href="version4-640.htm";
}
else {
if ( self.java ) { //nn3 »ç¿ë
var temp = java.awt.Toolkit.getDefaultToolkit();
var size = temp.getScreenSize();
var screenWidth = size.width; //³ÐÀÌ
var screenHeight = size.height; // ³ôÀÌ
if ( screenWidth == 1024 ) self.location.href="nn3-1024.htm";
else if ( screenWidth == 800 ) self.location.href="nn3-800.htm";
else self.location.href="nn3-640.htm";
}
else self.location.href="etc.htm" //nn2, ie3 ÀÌÇÏ.
}
window.screen·Î 800x600, 16M color·Î win95¿¡¼ ½ÃÇè°á°ú ÀÔ´Ï´Ù.
screenÀº nn4, ie4¿¡¼ Áö¿øÇÏ´Â ¸ð´ÏÅÍÀÇ ÇØ»óµµ¸¦ ³ªÅ¸³»´Â ObjectÀÔ´Ï´Ù.
|
NN4 width = 800 height = 600 pixelDepth = 16 colorDepth = 16 availWidth = 800 availHeight = 600 availLeft = 0 availTop = 0 |
IE4 width = 800 height = 600 bufferDepth = 0 colorDepth = 16 updateInterval = 0 |
*NN4*
availWidth, availHeight´Â »ç¿ëÀÚÀÇ taskbar°°Àº °ÍÀ» »« °ªÀÔ´Ï´Ù. colorDepth´Â »ç¿ëÇÒ ¼ö ÀÖ´Â »ö»ó°ªÀ̰í 256color¿¡¼ ´Ù¸£°Ô Ç¥½ÃµË´Ï´Ù. pixelDepth·Î »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.
color mode : 256 64K 16M
pixelDepth : 8 16 24
colorDepth : 18 16 24
*IE4*
colorDepth°¡ NN4ÀÇ pixelDepth°ª°ú °°°í Ç¥½ÃÇÒ ¼ö ÀÖ´Â colorÀ» ãÀ» ¶§, À̰ÍÀ» »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.
*NN3*
var temp = java.awt.Toolkit.getDefaultToolkit();
var size = temp.getScreenSize();
var screenWidth = size.width; //³ÐÀÌ
var screenHeight = size.height; // ³ôÀÌ
var screenColor = temp.getColorModel().getPixelSize(); // »ö»ó¼ö
screenWidth, screenHeight, screenColor ÀÌ 3°¡Áö·Î ±¸ºÐÇÒ ¼ö ÀÖ½À´Ï´Ù.
NN3ÀÇ »ö»ó¼ö´Â Java ¹öÁ¯ÀÌ 1.0.2ÀÏ °æ¿ì Ç×»ó 256 color¸¦ ¹ÝȯÇÕ´Ï´Ù. 1.1.2 ¹öÁ¯¿¡¼± Á¤È®È÷ Ç¥½ÃÇÕ´Ï´Ù. ¹öÁ¯ È®ÀÎÀº ver = java.lang.System.getProperty("java.version"); À¸·Î ÇÏ¸é µË´Ï´Ù. À̹ÌÁö·Îµµ ÆÇ´ÜÇÒ ¼ö ÀÖ½À´Ï´Ù.
<img src="gif_1x1.gif" width=100% height=1 name="IMG"> <script> var W = document.IMG.width if ( W > 800 ) self.location.href = "1024.htm" else if ( W > 640 ) self.location.href = "800.htm" else self.location.href = "640.htm" </script>