JavaScript中的fontsize()方法使用详解
作者:goldensun 时间:2024-06-05 09:55:25
此方法会导致就好像它是在一个<font size="size">标记的字符串显示在规定的大小
语法
string.fontsize( size )
下面是参数的详细信息:
color: 1和7之间的整数,代表1和7之间的有符号整数的字符串
返回值:
返回字符串<font size="size">标签
例子:
<html>
<head>
<title>JavaScript String fontsize() Method</title>
</head>
<body>
<script type="text/javascript">
var str = new String("Hello world");
alert(str.fontsize( 3 ));
</script>
</body>
</html>
这将产生以下结果:
<font size="3">Hello world</font>
标签:JavaScript,fontsize
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
el-table嵌套el-popover处理卡顿的解决
2024-05-09 15:22:34
![](https://img.aspxhome.com/file/2023/6/126436_0s.jpg)
Python多进程协作模拟实现流程
2021-07-01 17:52:38
Pandas DataFrame中的tuple元素遍历的实现
2023-12-21 09:47:00
python制作简单计算器功能
2022-08-06 20:57:16
![](https://img.aspxhome.com/file/2023/8/72278_0s.jpg)
python中Task封装协程的知识点总结
2022-10-25 13:25:02
Python selenium如何设置等待时间
2023-08-31 18:53:39
SQL Server的基本功能性语句介绍
2024-01-19 20:33:02
pycharm实现猜数游戏
2023-01-14 19:04:49
![](https://img.aspxhome.com/file/2023/5/67385_0s.jpg)
Anaconda+Pycharm+Pytorch虚拟环境创建(各种包安装保姆级教学)
2023-06-27 23:21:39
![](https://img.aspxhome.com/file/2023/9/85139_0s.png)
利用Python统计Jira数据并可视化
2023-06-26 00:11:46
Python入门_浅谈逻辑判断与运算符
2023-11-09 05:45:26
![](https://img.aspxhome.com/file/2023/8/64668_0s.png)
不得不承认:韩国的 Web 设计很唯美
2009-05-13 13:26:00
![](https://img.aspxhome.com/file/UploadPic/20095/13/1221540-46s.jpg)
在Python函数中输入任意数量参数的实例
2022-07-09 04:58:08
PyTorch 使用torchvision进行图片数据增广
2023-06-19 23:09:10
![](https://img.aspxhome.com/file/2023/3/92453_0s.jpg)
Go语言HttpRouter路由使用方法详解
2024-05-09 14:56:31
关于sql server批量插入和更新的两种解决方案
2024-01-15 02:20:42
解决使用export_graphviz可视化树报错的问题
2022-06-10 18:35:59
![](https://img.aspxhome.com/file/2023/2/84902_0s.jpg)
php+redis实现注册、删除、编辑、分页、登录、关注等功能示例
2024-04-30 08:50:09
![](https://img.aspxhome.com/file/2023/6/132786_0s.png)
python 中的int()函数怎么用
2021-05-21 17:52:41
日文片假名导致 Access 搜索“内存溢出”
2009-07-07 22:23:00
![](https://img.aspxhome.com/file/UploadPic/20097/7/japancode-54s.gif)