サイト内検索

String メソッド(HTML関連)

スポンサー

ホーム > String > fixed

fixed

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

シンタックス

stringObject.fixed()

サンプルコード

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

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

実行例

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

スポンサード リンク

inserted by FC2 system