其他分享
首页 > 其他分享> > js基础---Unicode编码表的使用

js基础---Unicode编码表的使用

作者:互联网

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <script type="text/javascript">
            
            /*
             * 在字符串中使用转义字符输入Unicode编码
             *     \u四位编码
             */
            console.log("\u2620");
            
        </script>
    </head>
    <body>
        
        <!--在网页中使用Unicode编码
            &#编码; 这里的编码需要的是10进制
        -->
        <h1 style="font-size: 200px;">&#9760;</h1>
        <h1 style="font-size: 200px;">&#9856;</h1>
        
    </body>
</html>
             * 在字符串中使用转义字符输入Unicode编码              *  \u四位编码                  在网页中使用Unicode编码             &#编码; 这里的编码需要的是10进制    

标签:编码,js,---,转义字符,&#,Unicode,使用,四位
来源: https://www.cnblogs.com/leiyanting/p/15178579.html