ﺖﭙﯾﺮﮑﺳﺍ ﺍﻭﺎﺟ ﻩﺮﺠﻨﭘ ﺮﺑﻭﺎﻧ


فهرست مطالب

    نمایش فهرست مطالب


ﺩﺭﻮﻣ ﺭﺩ ﯽﺗﺎﻋﻼﻃﺍ ﯼﻭﺎﺣ window.navigator ﯽﺷ


ﻩﺮﺠﻨﭘ ﺮﺑﻭﺎﻧ

.ﺖﺷﻮﻧ ﻩﺮﺠﻨﭘ ﺪﻧﻮﺸﯿﭘ ﻥﻭﺪﺑ ﻥﺍﻮﺗ ﯽﻣ ﺍﺭ window.navigator

:ﻪﻧﻮﻤﻧ ﺪﻨﭼ

  • navigator.cookieEnabled

  • navigator.appCodeName

  • navigator.platform


ﺮﮔﺭﻭﺮﻣ ﯼﺎﻫ ﯽﮐﻮﮐ

ﺕﺭﻮﺻ ﻦﯾﺍ ﺮﯿﻏ ﺭﺩ ،ﺪﻧﺍﺩﺮﮔﯽﻣﺮﺑ ﺍﺭ code class="w3-codespan">cookieEnabled tru

ﻝﺎﺜﻣ

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML =
"cookiesEnabled is " + navigator.cookieEnabled;
</script>

→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ

<!DOCTYPE html>
<html>
<body>

<h2>The Navigator Object</h2>

<p>The cookieEnabled property returns true if cookies are enabled:</p>

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML =
"navigator.cookieEnabled is " + navigator.cookieEnabled;
</script>

</body>
</html>

ﺮﮔﺭﻭﺮﻣ ﻪﻣﺎﻧﺮﺑ ﻡﺎﻧ

ﺪﻧﺍﺩﺮﮔﯽﻣﺮﺑ ﺍﺭ ﻪﻣﺎﻧﺮﺑ ﻡﺎﻧ appName ﯽﮔﮋﯾﻭ

ﻝﺎﺜﻣ

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML =
"navigator.appName is " + navigator.appName;
</script>

→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ

<!DOCTYPE html>
<html>
<body>

<h2>The Navigator Object</h2>

<p>The appName property returns the application name of the browser:</p>

<p id="demo"></p>

<p>Strange enough, "Netscape" is the application name for IE11, Chrome, Firefox, and Safari.</p>

<script>
document.getElementById("demo").innerHTML = 
"navigator.appName is " + navigator.appName;
</script>

</body>
</html>

ﺭﺍﺪﺸﻫ

.(ﻩﺪﺷ ﺥﻮﺴﻨﻣ) ﺖﺳﺍ ﻩﺪﺷ ﻑﺬﺣ ﺏﻭ ﺩﺭﺍﺪﻧﺎﺘﺳﺍ ﻦﯾﺮﺧﺁ ﺭﺩ ﯽﮔﮋﯾﻭ ﻦﯾﺍ

.ﺪﻨﻧﺍﺩﺮﮔﯽﻣﺮﺑ appName ﻥﺍﻮﻨﻋ ﻪﺑ ﺍﺭ Netscape (IE11، Chrome، Firefox، Safari)



ﺮﮔﺭﻭﺮﻣ ﻪﻣﺎﻧﺮﺑ ﺪﮐ ﻡﺎﻧ

ﺪﻧﺍﺩﺮﮔﯽﻣﺮﺑ ﺍﺭ ﻪﻣﺎﻧﺮﺑ ﺪﮐ ﻡﺎﻧ appCodeName ﯽﮔﮋﯾﻭ

ﻝﺎﺜﻣ

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML =
 "navigator.appCodeName is " + navigator.appCodeName;
</script>

→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ

<!DOCTYPE html>
<html>
<body>

<h2>JavaScript Navigator</h2>

<p>The appCodeName property returns the code name of the browser.</p>

<p>Do not rely on it! "Mozilla" is the application code name for Chrome, Firefox, IE, Safari, and Opera.</p>

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML = 
"navigator.appCodeName is " + navigator.appCodeName;
</script>

</body>
</html>

ﺭﺍﺪﺸﻫ

.(ﻩﺪﺷ ﺥﻮﺴﻨﻣ) ﺖﺳﺍ ﻩﺪﺷ ﻑﺬﺣ ﺏﻭ ﺩﺭﺍﺪﻧﺎﺘﺳﺍ ﻦﯾﺮﺧﺁ ﺭﺩ ﯽﮔﮋﯾﻭ ﻦﯾﺍ

.ﺪﻨﻧﺍﺩﺮﮔﯽﻣﺮﺑ appCodeName ﻥﺍﻮﻨﻋ ﻪﺑ ﺍﺭ Mozilla (IE11، Chrome، Firefox، Safa


ﺮﮔﺭﻭﺮﻣ ﺭﻮﺗﻮﻣ

ﺩﺩﺮﮔﯽﻣﺮﺑ product ﯽﮔﮋﯾﻭ

ﻝﺎﺜﻣ

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML =
 "navigator.product is " + navigator.product;
</script>

→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ

<!DOCTYPE html>
<html>
<body>

<h2>The Navigator Object</h2>

<p>The product property returns the product name of the browser.</p>

<p>Do not rely on it! Most browsers returns "Gecko" as product name!</p>

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML =
"navigator.product is " + navigator.product;
</script>

</body>
</html>

ﺭﺍﺪﺸﻫ

.(ﻩﺪﺷ ﺥﻮﺴﻨﻣ) ﺖﺳﺍ ﻩﺪﺷ ﻑﺬﺣ ﺏﻭ ﺩﺭﺍﺪﻧﺎﺘﺳﺍ ﻦﯾﺮﺧﺁ ﺭﺩ ﯽﮔﮋﯾﻭ ﻦﯾﺍ

.ﺪﻨﻧﺍﺩﺮﮔ ﯽﻣﺮﺑ ﻝﻮﺼﺤﻣ ﻥﺍﻮﻨﻋ ﻪﺑ ﺍﺭ Gecko ﺎﻫﺮﮔﺭﻭﺮﻣ ﺮﺜﮐﺍ


ﺮﮔﺭﻭﺮﻣ ﻪﺨﺴﻧ

ﺩﺩﺮﮔﯽﻣﺮﺑ appVersion ﯽﮔﮋﯾﻭ

ﻝﺎﺜﻣ

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML = navigator.appVersion;
</script>

→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ

<!DOCTYPE html>
<html>
<body>

<h2>The Navigator Object</h2>

<p>The appVersion property returns version information about the browser:</p>

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML = navigator.appVersion;
</script>

</body>
</html>

ﺮﮔﺭﻭﺮﻣ ﻞﻣﺎﻋ

:ﺪﻧﺍﺩﺮﮔ ﯽﻣﺮﺑ ﺭﻭﺮﺳ ﻪﺑ ﺍﺭ ﺮﮔﺭﻭﺮﻣ ﻂﺳﻮﺗ ﻩﺪﺷ ﻝﺎﺳﺭﺍ user-agent ﺭﺪﻫ

ﻝﺎﺜﻣ

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML = navigator.userAgent;
</script>

→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ

<!DOCTYPE html>
<html>
<body>

<h2>The Navigator Object</h2>

<p>The userAgent property returns the user-agent header sent by the browser to the server:</p>

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML =
navigator.userAgent;
</script>

</body>
</html>

ﺭﺍﺪﺸﻫ

.ﺪﺷﺎﺑ ﻩﺪﻨﻨﮐ ﻩﺍﺮﻤﮔ ﺪﻧﺍﻮﺗ ﯽﻣ ﺐﻠﻏﺍ ﺮﺑﻭﺎﻧ ﯽﺷ ﺯﺍ ﺕﺎﻋﻼﻃﺍ

:ﺍﺮﯾﺯ ﺩﻮﺷ ﻩﺩﺎﻔﺘﺳﺍ ﺮﮔﺭﻭﺮﻣ ﯼﺎﻫ ﻪﺨﺴﻧ ﯽﯾﺎﺳﺎﻨﺷ ﯼﺍﺮﺑ ﺪﯾﺎﺒﻧ ﺮﺑﻭﺎﻧ ﯽﺷ


ﺮﮔﺭﻭﺮﻣ ﻡﺮﻔﺘﻠﭘ

ﺪﻧﺍﺩﺮﮔ ﯽﻣﺮﺑ ﺍﺭ ﺮﮔﺭﻭﺮﻣ ﻡﺮﻓ ﺖﻠﭘ platform ﯽﮔﮋﯾﻭ

ﻝﺎﺜﻣ

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML = navigator.platform;
</script>

→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ

<!DOCTYPE html>
<html>
<body>

<h2>The Navigator Object</h2>

<p>The platform property returns the browser platform (operating system):</p>

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML = 
"navigator.platform is " + navigator.platform;
</script>

</body>
</html>

ﺮﮔﺭﻭﺮﻣ ﻥﺎﺑﺯ

:ﺪﻧﺍﺩﺮﮔﯽﻣﺮﺑ ﺍﺭ ﺮﮔﺭﻭﺮﻣ ﻥﺎﺑﺯ language ﯽﮔﮋﯾﻭ

ﻝﺎﺜﻣ

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML = navigator.language;
</script>

→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ

<!DOCTYPE html>
<html>
<body>

<h2>The Navigator Object</h2>

<p>The language property returns the browser's language:</p>

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML =
"navigator.language is " + navigator.language;
</script>

</body>
</html>

؟ﺖﺳﺍ ﻦﯾﻼﻧﺁ ﺮﮔﺭﻭﺮﻣ ﺎﯾﺁ

:ﺪﻧﺍﺩﺮﮔﯽﻣﺮﺑ ﺍﺭ code class="w3-codespan">onLine true> ﯽﮔﮋﯾﻭ ،ﺪﺷﺎﺑ ﻦﯾﻼﻧﺁ ﺮﮔ

ﻝﺎﺜﻣ

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML = navigator.onLine;
</script>

→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ

<!DOCTYPE html>
<html>
<body>

<h2>The Navigator Object</h2>

<p>The onLine property returns true if the browser is online:</p>

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML =
"navigator.onLine is " + navigator.onLine;
</script>

</body>
</html>

؟ﺖﺳﺍ ﻝﺎﻌﻓ ﺍﻭﺎﺟ ﺎﯾﺁ

:ﺪﻧﺍﺩﺮﮔﯽﻣﺮﺑ ﺍﺭ code class="w3-codespan">javaEnabled() true> ﺵﻭﺭ ،ﺪﺷﺎﺑ ﻝﺎﻌ

ﻝﺎﺜﻣ

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML = navigator.javaEnabled();
</script>

→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ

<!DOCTYPE html>
<html>
<body>

<h2>The Navigator Object</h2>

<p>The javaEnabled() method returns true if Java is enabled:</p>

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML =
"javaEnabled is " + navigator.javaEnabled();
</script>

</body>
</html>

تمامی حقوق محفوظ است. © BasicIT.org • 2023-2024