JavaScript -------改变字体样式

var txt='Hello World !';

 document.write("

字体变大: " + txt.big() + "

");

document.write("

字体缩小: " + txt.small() + "

");


document.write("

字体加粗: " + txt.bold() + "

");


document.write("

斜体: " + txt.italics() + "

");


document.write("

固定定位: " + txt.fixed() + "

");


document.write("

加删除线: " + txt.strike() + "

");


document.write("

字体颜色: " + txt.fontcolor("green") + "

");


document.write("

字体大小: " + txt.fontsize(6) + "

");


document.write("

下标: " + txt.sub() + "

");


document.write("

上标: " + txt.sup() + "

");


document.write("

链接: " + txt.link("http://www.w3cschool.cc") + "

");


document.write("

闪动文本: " + txt.blink() + " (不能用于IE,Chrome,或者Safari)

");

你可能感兴趣的:(Javascript基础)