サイト内検索

String メソッド(HTML関連)

スポンサー

ホーム > String > sup

sup

HTMLの <sup> タグで囲まれた文字列を返します.

シンタックス

stringObject.sup()

サンプルコード

以下にsupメソッドを使用して <sup> タグを作成するサンプルコードを示します.

<html>
  <head>
    <title>supメソッドのサンプルコード</title>
  </head>
  <body>
    <script type="text/javascript" language="javascript">
      var str = "Snoopy";
      document.write("<p>normal: " + str + "</p>");
      document.write("<p>sup: " + str.sup() + "</p>");
    </script>
  </body>
</html>

実行例

サンプルコードの実行結果は以下のようになります.

スポンサード リンク

inserted by FC2 system