📄 ex9-23.htm
字号:
<html><head><title>String对象的方法-格式化字符串方法</title></head>
<body bgColor="lightblue">
<font face="宋体" size=+1>
<h4>对象的方法-格式化字符串方法 </h4>
<script language="JavaScript">
<!--
var str1 = "野旷天低树,江清月近人。";
var str2 = new String("I did not object to the object.");
document.write("<br>str1.anchor('chinapic')的运行结果为:"+ str1.anchor('chinapic'));
document.write("<br>str1.big()的运行结果为:"+ str1.big());
document.write("<br>str1.blink()的运行结果为:"+ str1.blink());
document.write("<br>str1.bold()的运行结果为:"+ str1.bold());
document.write("<br>str2的正常显示效果为:"+ str2);
document.write("<br>str2.fixed()的运行结果为:"+ str2.fixed());
document.write("<br>str1.fontcolor('blue')的运行结果为:"+ str1.fontcolor('blue'));
document.write("<br>str1.fontsize('+2')的运行结果为:"+ str1.fontsize('+2'));
document.write("<br>str1.italics()的运行结果为:"+ str1.italics());
document.write("<br>str1.link('www.zcf.net')的运行结果为:"+ str1.link('www.zcf.net'));
document.write("<br>str1.small()的运行结果为:"+ str1.small());
document.write("<br>str1.strike()的运行结果为:"+ str1.strike());
document.write("<br>str2.sub()的运行结果为:"+str1 +str2.sub());
document.write("<br>str2.sup()的运行结果为:"+str1 +str2.sup());
//-->
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -