ﺖﺳﺍ ﺕﺎﻋﻼﻃﺍ ﯼﻭﺎﺣ window.screen ﯽﺷ
.ﺖﺷﻮﻧ ﻩﺮﺠﻨﭘ ﺪﻧﻮﺸﯿﭘ ﻥﻭﺪﺑ ﻥﺍﻮﺗ ﯽﻣ ﺍﺭ window.screen
ﯽﺷ
:ﺹﺍﻮﺧ
screen.width
screen.height
screen.availWidth
screen.availHeight
screen.colorDepth
screen.pixelDepth
ﺭﺩ ﺍﺭ ﻩﺪﻨﻨﮐﺪﯾﺩﺯﺎﺑ ﻪﺤﻔﺻ ﺽﺮﻋ screen.width
ﯽﮔﮋﯾﻭ
:ﻞﺴﮑﯿﭘ ﻪﺑ ﻪﺤﻔﺻ ﺽﺮﻋ ﺶﯾﺎﻤﻧ
document.getElementById("demo").innerHTML =
"Screen Width: " + screen.width;
:ﺩﻮﺑ ﺪﻫﺍﻮﺧ ﻪﺠﯿﺘﻧ
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<body>
<p id="demo"></p>
<script>
document.getElementById("demo").innerHTML =
"Screen width is " + screen.width;
</script>
</body>
</html>
.ﺪﻧﺍﺩﺮﮔ ﯽﻣﺮﺑ ﻞﺴﮑﯿﭘ ﺐﺴﺣ ﺮﺑ ﺍﺭ ﻩﺪﻨﻨﮐﺪﯾﺩﺯﺎﺑ ﻪﺤﻔﺻ ﻉﺎﻔﺗﺭﺍ screen
:ﻞﺴﮑﯿﭘ ﻪﺑ ﻪﺤﻔﺻ ﻉﺎﻔﺗﺭﺍ ﺶﯾﺎﻤﻧ
document.getElementById("demo").innerHTML =
"Screen Height: " + screen.height;
:ﺩﻮﺑ ﺪﻫﺍﻮﺧ ﻪﺠﯿﺘﻧ
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<body>
<p id="demo"></p>
<script>
document.getElementById("demo").innerHTML =
"Screen height is " + screen.height;
</script>
</body>
</html>
ﺭﺩ ﺍﺭ ﻩﺪﻨﻨﮐ ﺪﯾﺩﺯﺎﺑ ﻪﺤﻔﺻ ﺽﺮﻋ screen.availWidth
ﯽﮔﮋﯾﻭ
:ﻞﺴﮑﯿﭘ ﺐﺴﺣ ﺮﺑ ﺶﯾﺎﻤﻧ ﻪﺤﻔﺻ ﺩﻮﺟﻮﻣ ﺽﺮﻋ ﺶﯾﺎﻤﻧ
document.getElementById("demo").innerHTML =
"Available Screen Width: " + screen.availWidth;
:ﺩﻮﺑ ﺪﻫﺍﻮﺧ ﻪﺠﯿﺘﻧ
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<body>
<p id="demo"></p>
<script>
document.getElementById("demo").innerHTML =
"Available screen width is " + screen.availWidth;
</script>
</body>
</html>
،ﺪﻧﺍﺩﺮﮔﯽﻣﺮﺑ ﺍﺭ ﻩﺪﻨﻨﮐﺪﯾﺩﺯﺎﺑ ﻪﺤﻔﺻ ﻉﺎﻔﺗﺭﺍ screen.availHei
:ﺪﯿﻫﺩ ﺶﯾﺎﻤﻧ ﻞﺴﮑﯿﭘ ﺐﺴﺣ ﺮﺑ ﺍﺭ ﺶﯾﺎﻤﻧ ﻪﺤﻔﺻ ﺩﻮﺟﻮﻣ ﻉﺎﻔﺗﺭﺍ
document.getElementById("demo").innerHTML =
"Available Screen Height: " + screen.availHeight;
:ﺩﻮﺑ ﺪﻫﺍﻮﺧ ﻪﺠﯿﺘﻧ
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<body>
<p id="demo"></p>
<script>
document.getElementById("demo").innerHTML =
"Available screen height is " + screen.availHeight;
</script>
</body>
</html>
.ﺪﻧﺍﺩﺮﮔ ﯽﻣﺮﺑ ﺍﺭ ﮓﻧﺭ ﮏﯾ ﺶﯾﺎﻤﻧ ﯼﺍﺮﺑ ﻩﺪﺷ ﻩﺩﺎﻔﺘﺳﺍ ﯼﺎﻫ ﺖﯿﺑ ﺩﺍﺪﻌﺗ :ﺪﻨﻨﮐ ﯽﻣ ﻩﺩﺎﻔﺘﺳﺍ ﮓﻧﺭ ﺡﻮﺿﻭ ﯼﺍﺮﺑ ﯽﺘﯿﺑ 32 ﺎﯾ ﯽﺘﯿﺑ 24 ﺭﺍﺰﻓﺍ ﺖﺨﺳ ﺯﺍ ﻥﺭﺪﻣ ﯼﺎﻫﺮﺗﻮﯿﭙﻣﺎﮐ ﻪﻤﻫ ﺕﻭﺎﻔﺘﻣ «ﯽﻌﻗﺍﻭ ﮓﻧﺭ» 16777216 = ﺖﯿﺑ 24 ﻒﻠﺘﺨﻣ "ﻖﯿﻤﻋ ﯼﺎﻫ ﮓﻧﺭ" 4,294,967,296=ﺖﯿﺑ 32 .ﺕﻭﺎﻔﺘﻣ "High Colors" ﻦﺷﻮﻟﻭﺯﺭ 65536 :ﺪﻧﺩﺮﮐ ﯽﻣ ﻩﺩﺎﻔﺘﺳﺍ ﺖﯿﺑ 16 ﺯﺍ ﯽﻤﯾﺪﻗ ﯼﺎﻫﺮﺗﻮﯿﭙﻣﺎﮐ .VGA ﻒﻠﺘﺨﻣ ﮓﻧﺭ 256 :ﺪﻧﺩﺮﮐ ﯽﻣ ﻩﺩﺎﻔﺘﺳﺍ ﺖﯿﺑ 8 ﺯﺍ ﯽﻤﯾﺪﻗ ﻩﺍﺮﻤﻫ ﯼﺎﻫ ﻦﻔﻠﺗ ﻭ ﯽﻤﯾﺪﻗ ﺭﺎﯿﺴﺑ ﯼﺎﻫ :ﺖﯿﺑ ﻪﺑ ﺶﯾﺎﻤﻧ ﻪﺤﻔﺻ ﮓﻧﺭ ﻖﻤﻋ ﺶﯾﺎﻤﻧ :ﺩﻮﺑ ﺪﻫﺍﻮﺧ ﻪﺠﯿﺘﻧ → ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ .ﺖﺳﺍ (ﻒﻠﺘﺨﻣ ﮓﻧﺭ 16777216) "ﯽﻌﻗﺍﻭ ﯼﺎﻫ ﮓﻧﺭ" ﻩﺪﻨﻫﺩ ﻥﺎﺸﻧ HTML ﺭﺩ ﻩﺩﺎﻔﺘﺳﺍ ﺩﺭﻮﻣ rrggbb (rgb .ﺪﻧﺍﺩﺮﮔ ﯽﻣﺮﺑ ﺍﺭ ﻪﺤﻔﺻ ﻞﺴﮑﯿﭘ ﻖﻤﻋ :ﺖﯿﺑ ﻪﺑ ﺶﯾﺎﻤﻧ ﻪﺤﻔﺻ ﻞﺴﮑﯿﭘ ﻖﻤﻋ ﺶﯾﺎﻤﻧ :ﺩﻮﺑ ﺪﻫﺍﻮﺧ ﻪﺠﯿﺘﻧ → ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ .ﺪﻨﺘﺴﻫ ﺮﺑﺍﺮﺑ ﻞﺴﮑﯿﭘ ﻖﻤﻋ ﻭ ﮓﻧﺭ ﻖﻤﻋ ،ﻥﺭﺪﻣ ﯼﺎﻫﺮﺗﻮﯿﭙﻣﺎﮐ ﯼﺍﺮﺑ ﻝﺎﺜﻣ
document.getElementById("demo").innerHTML =
"Screen Color Depth: " + screen.colorDepth;
<!DOCTYPE html>
<html>
<body>
<p id="demo"></p>
<script>
document.getElementById("demo").innerHTML =
"Screen color depth is " + screen.colorDepth;
</script>
</body>
</html>
ﻩﺮﺠﻨﭘ ﺶﯾﺎﻤﻧ ﻪﺤﻔﺻ ﻞﺴﮑﯿﭘ ﻖﻤﻋ
screen.pixelDepth
ﯽﮔﮋ ﻝﺎﺜﻣ
document.getElementById("demo").innerHTML =
"Screen Pixel Depth: " + screen.pixelDepth;
<!DOCTYPE html>
<html>
<body>
<p id="demo"></p>
<script>
document.getElementById("demo").innerHTML =
"Screen pixel depth is " + screen.pixelDepth;
</script>
</body>
</html>