Javascript-string-small

提供:Dev Guides
移動先:案内検索

JavaScript文字列-small()メソッド

説明

このメソッドにより、文字列は<small>タグ内にあるかのように小さなフォントで表示されます。

構文

その構文は次のとおりです-

string.small( )

戻り値

<small>タグ付きの文字列を返します。

次の例を試してください。

<html>
   <head>
      <title>JavaScript String small() Method</title>
   </head>

   <body>
      <script type = "text/javascript">
         var str = new String("Hello world");
         alert(str.small());
      </script>
   </body>
</html>

出力

<small>Hello world</small>