From fbfc821d0024098150072144bf198f17f7ecb98f Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Fri, 30 Jul 2021 12:58:58 +0900 Subject: ElementCSSInlineStyle の削除関係 (#1591) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ElementCSSInlineStyle の削除に関連する各ファイルを最新の英語版に同期 --- .../global_objects/string/small/index.html | 60 ++++++++++------------ 1 file changed, 26 insertions(+), 34 deletions(-) (limited to 'files/ja/web/javascript/reference/global_objects/string/small') diff --git a/files/ja/web/javascript/reference/global_objects/string/small/index.html b/files/ja/web/javascript/reference/global_objects/string/small/index.html index 5e18de421a..40beeca185 100644 --- a/files/ja/web/javascript/reference/global_objects/string/small/index.html +++ b/files/ja/web/javascript/reference/global_objects/string/small/index.html @@ -2,71 +2,63 @@ title: String.prototype.small() slug: Web/JavaScript/Reference/Global_Objects/String/small tags: - - Deprecated - - HTML wrapper methods - - JavaScript - - Method - - Prototype - - Reference - - String +- Deprecated +- HTML wrapper methods +- JavaScript +- Method +- Prototype +- Reference +- String +- Polyfill +browser-compat: javascript.builtins.String.small translation_of: Web/JavaScript/Reference/Global_Objects/String/small ---
{{JSRef}} {{deprecated_header}}

small() メソッドは、文字列が小さなフォントで表示されるように HTML の {{HTMLElement("small")}} 要素を生成します。

-

構文

+

構文

-
str.small()
+
small()
-

返値

+

返値

HTML の {{HTMLElement("small")}} 要素を含む文字列です。

-

解説

+

解説

small() メソッドは、文字列を <small> 要素の中に、 "<small>str</small>" のように埋め込みます。

-

+

-

small() の使用

+

small() の使用

以下の例では文字列のメソッドを使用して、文字列の大きさを変更しています。

-
var worldString = 'Hello, world';
+
var worldString = 'Hello, world';
 
 console.log(worldString.small());     // <small>Hello, world</small>
 console.log(worldString.big());       // <big>Hello, world</big>
 console.log(worldString.fontsize(7)); // <font size="7">Hello, world</fontsize>
 
-

{{domxref("ElementCSSInlineStyle/style", "element.style")}} オブジェクトを使用すると、要素の style 属性を使用して、次のようにもっと汎用的に操作することができます。

+

{{domxref("HTMLElement/style", "element.style")}} オブジェクトを使用すると、要素の style 属性を使用して、次のようにもっと汎用的に操作することができます。

-
document.getElementById('yourElemId').style.fontSize = '0.7em';
+
document.getElementById('yourElemId').style.fontSize = '0.7em';
 
-

仕様書

+

仕様書

- - - - - - - - - - - -
仕様書
{{SpecName('ESDraft', '#sec-string.prototype.small', 'String.prototype.small')}}
+{{Specifications}} -

ブラウザーの互換性

+

ブラウザーの互換性

-

{{Compat("javascript.builtins.String.small")}}

+

{{Compat}}

-

関連情報

+

関連情報

    -
  • {{jsxref("String.prototype.fontsize()")}}
  • -
  • {{jsxref("String.prototype.big()")}}
  • +
  • String.prototype.small のポリフィルは core-js で利用できます
  • +
  • {{jsxref("String.prototype.fontsize()")}}
  • +
  • {{jsxref("String.prototype.big()")}}
-- cgit v1.2.3-54-g00ecf