最新のWeb開発のチュートリアル
 

JavaScript弦italics() method

<JavaScriptの文字列リファレンス

イタリックのテキストを表示します。

var str = "Hello World!";
var result = str.italics();
»それを自分で試してみてください

もっと"Try it Yourself"以下の例。


定義と使用法

italics()メソッドは、標準的ではなく、すべてのブラウザで正常に動作しない場合があります。

italics()メソッドは、斜体の文字列を表示するために使用されます。

このメソッドは、に埋め込まれた文字列を返します<i> 、このように、タグを:

<私>文字列</ I>


ブラウザのサポート

方法
italics() はい はい はい はい はい

構文

パラメーター
なし。

技術的な詳細

戻り値: 中に埋め込まれた文字列<i>タグ
JavaScriptのバージョン: 1.0

例

その他の例

関連した方法のデモンストレーション:

var txt = "Hello World!";

document.write("The original string: " + txt);
document.write("<p>Big: " + txt.big() + "</p>");
document.write("<p>Small: " + txt.small() + "</p>");
document.write("<p>Bold: " + txt.bold() + "</p>");
document.write("<p>Italic: " + txt.italics() + "</p>");
document.write("<p>Fixed: " + txt.fixed() + "</p>");
document.write("<p>Strike: " + txt.strike() + "</p>");
document.write("<p>Fontcolor: " + txt.fontcolor("green") + "</p>");
document.write("<p>Fontsize: " + txt.fontsize(6) + "</p>");
document.write("<p>Subscript: " + txt.sub() + "</p>");
document.write("<p>Superscript: " + txt.sup() + "</p>");
document.write("<p>Link: " + txt.link("http://www.w3ii.com") + "</p>");
document.write("<p>Blink: " + txt.blink() + " (works only in Opera)</p>");
»それを自分で試してみてください

<JavaScriptの文字列リファレンス