JavaScript基础知识-Unicode编码表

                                          作者:尹正杰

版权声明:原创作品,谢绝转载!否则将追究法律责任。

  Unicode的编码表也被称为万国码,里面包含了各种字符编码(https://www.unicode.org/charts/)。

一.JavaScript源代码

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Unicode编码表</title>
<script type="text/javascript">
/**
* 在字符串中使用转义字符输入Unicode编码,"\u"四位十进制编码。
*/
console.log("\u2620");
console.log("\u2680");
console.log("\u2681");
console.log("\u2682");
console.log("\u2683");
console.log("\u2684");
console.log("\u2685");
console.log("\u2660");
console.log("\u2661");
console.log("\u2662");
console.log("\u2663");
</script>
</head>
<body>
<!--
在网页中使用Unicode编码,"&#编码;"这里的编码需要的是10进制。
-->
<h1 style="font-size: 50px;">♠</h1>
<h1 style="font-size: 50px;">♡</h1>
<h1 style="font-size: 50px;">♢</h1>
<h1 style="font-size: 50px;">♣</h1>
</body>
</html>

二.浏览器打开以上代码渲染结果

最新文章

  1. NET基础(3):is 和 as 操作符
  2. jQuery on 绑定的事件触发多次
  3. Python QRCODE
  4. Swift 使用CollectionView 实现图片轮播封装就是这样简单
  5. iOS:UIMapView地图视图控件的简单使用
  6. hip-hop初探
  7. 福州大学 Problem 2168 防守阵地 I
  8. IIS not allow PUT and DELETE method
  9. CSS 浅析position:relative/absolute定位方式
  10. 側滑回退的layout(相似IOS側滑回退到上一个activity)
  11. Python定时任务框架APScheduler
  12. manjaro使用国内软件源
  13. mysql索引类型-方法-形式-使用时机-不足之处--注意事项
  14. [转载]微软VS2015支持Android和iOS编程
  15. SQL Server 损坏修复 之一 常见错误解读
  16. IOS端的摇一摇功能
  17. mysql 小于等于0 不包含null
  18. BZOJ5281: [Usaco2018 Open]Talent Show 01分数规划+01背包
  19. BOM对象思维导图
  20. Android(十六 ) android 与蓝牙串口通讯

热门文章

  1. [what is machine learning?]
  2. java感想
  3. 广商博客冲刺第六七天new
  4. 第二次作业:Git的安装与使用
  5. Sqlite,libevent,openssl,mosquito交叉编译
  6. 批处理-For详解
  7. 手动安装ettercap的过程
  8. jdk1.8 HashMap红黑树操作详解-putTreeVal()
  9. asp.net 的三种开发模式
  10. windows 下编程实现打印日志