English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Navigator cookieEnabled Eigenschaft

JavaScript Navigator-Objekt

cookieEnabledDiese Eigenschaft gibt einen Booleschen Wert zurück, der angibt, ob Cookies im Browser aktiviert sind.

Diese Eigenschaft gibt true zurück, wenn Cookies aktiviert sindtrue, sonstfalse.

Sie finden weitere Informationen in unserenJavaScript Cookies-TutorialErfahren Sie mehr über Cookies.

Syntax:

navigator.cookieEnabled
var x = navigator.cookieEnabled;
document.querySelector("#output").innerHTML = x;
Testen Sie es heraus‹/›

Browser-Kompatibilität

Alle Browser unterstützen die Eigenschaft cookieEnabled vollständig:

Eigenschaft
cookieEnabledJaJaJaJaJa

Technische Details

Rückgabewert:Boolescher Wert, gibt true zurück, wenn Cookies aktiviert sind, sonst false

Mehr Beispiele

Dieser Beispiel zeigt alle Navigator-Attribute:

var txt = "";
txt += "<p>Browser-CodeName: " + navigator.appCodeName + "</p>";
txt += "<p>Browser-Name: " + navigator.appName + "</p>";
txt += "<p>Browser-Version: " + navigator.appVersion + "</p>";
txt += "<p>Cookies aktiviert: " + navigator.cookieEnabled + "</p>";
txt += "<p>Browser Language: " + navigator.language + "</p>";
txt += "<p>Browser Online: " + navigator.onLine + "</p>";
txt += "<p>Platform: " + navigator.platform + "</p>";
txt += "<p>User-agent header: " + navigator.userAgent + "</p>";
document.write(txt);
Testen Sie es heraus‹/›

Zusammenhängende Referenzen

Navigator-Referenz:navigator.appCodeName-Attribut

Navigator-Referenz:navigator.appname-Attribut

Navigator-Referenz:navigator.appVersion-Attribut

Navigator-Referenz:navigator.language-Attribut

Navigator-Referenz:navigator.onLine-Attribut

Navigator-Referenz:navigator.platform-Attribut

Navigator-Referenz:navigator.userAgent-Attribut

JavaScript Navigator-Objekt