A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/de/docs/Web/API/HTMLScriptElement/text below:

HTMLScriptElement: text-Eigenschaft - Web-APIs | MDN

HTMLScriptElement: text-Eigenschaft

Baseline Widely available *

Die text-Eigenschaft des HTMLScriptElement-Interfaces ist ein String, der den Textinhalt innerhalb des <script>-Elements widerspiegelt. Sie funktioniert auf die gleiche Weise wie die Node.textContent-Eigenschaft.

Sie spiegelt das text-Attribut des <script>-Elements wider.

Wert

Ein String.

Beispiele
<script id="el" type="text/javascript">
  const num = 10;
  console.log(num);
</script>
const el = document.getElementById("el");
console.log(el.text); // Output: "\n  const num = 10;\n  console.log(num);\n"
console.log(el.textContent); // Output: "\n  const num = 10;\n  console.log(num);\n"

el.text = "console.log(10);";
console.log(el.text); // Output: "console.log(10);"
console.log(el.textContent); // Output: "console.log(10);"
Spezifikationen Browser-Kompatibilität MDN-Feedback-Box War diese Übersetzung hilfreich?

Diese Seite wurde automatisch aus dem Englischen übersetzt.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4