A RetroSearch Logo

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

Search Query:

Showing content from http://developer.mozilla.org/ja/docs/Web/API/HTMLScriptElement/text below:

HTMLScriptElement: text プãƒãƒ‘ティ - Web API

HTMLScriptElement: text プロパティ

Baseline Widely available *

text は HTMLScriptElement インターフェイスのプロパティで、<script> 要素内のテキストコンテンツを反映する文字列です。これは Node.textContent プロパティと同じ方法で動作します。

これは <script> 要素の text 属性を反映したものです。

値

文字列です。

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

el.text = "console.log(10);";
console.log(el.text); // 出力: "console.log(10);"
console.log(el.textContent); // 出力: "console.log(10);"
仕様書 ブラウザーの互換性

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