JScript方法-fontsize方法

来源:互联网 发布:笔芯网络语什么意思 编辑:程序博客网 时间:2024/05/07 12:03
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>

把一个带有 size 属性的 html <font> 标记放置在 string 对象中的文本的两端。

strvariable.fontsize(intsize)

参数
strvariable

必选项。任意的 string 对象或文字。

intsize

必选项。用来指定文本大小的整数值。

说明
下面的示例说明了 fontsize 方法的用法:

var strvariable = "this is a string";
strvariable = strvariable.fontsize(-1);
最后一条语句执行完后,strvariable 的值是:

<font size="-1">this is a string</font>
有效的整数值取决于 microsoft JScript 主机。详细信息请参阅主机的说明书。

不检查该标记是否已经被应用于该字符串了。

要求
版本 1
<<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>