String.fromCharCode(88,83,83) 方法返回由指定的 UTF-16 代码单元序列创建的字符串

方法返回由指定的 UTF-16 代码单元序列创建的字符串

String.fromCharCode() - JavaScript | MDN https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script>
var x = document.createElement("a");
x.href = "#";
// In the line of code below, the encoded data on the right (the second argument to setAttribute)
// is an example of untrusted data that was properly JavaScript encoded but still executes.
x.setAttribute("onclick", "\u0061\u006c\u0065\u0072\u0074\u0028\u0032\u0032\u0029");
var y = document.createTextNode("Click To Test");
x.appendChild(y);
document.body.appendChild(x);

for(var \u0062=0; \u0062 < 10; \u0062++){
\u0064\u006f\u0063\u0075\u006d\u0065\u006e\u0074
.\u0077\u0072\u0069\u0074\u0065\u006c\u006e
("\u0048\u0065\u006c\u006c\u006f\u0020\u0057\u006f\u0072\u006c\u0064");
}
\u0077\u0069\u006e\u0064\u006f\u0077
.\u0065\u0076\u0061\u006c
\u0064\u006f\u0063\u0075\u006d\u0065\u006e\u0074
.\u0077\u0072\u0069\u0074\u0065(111111111);
</script>
</body>
</html>

 

 

在线中文汉字/ASCII码/Unicode编码互相转换工具 - 编码转换工具 - 脚本之家在线工具 http://tools.jb51.net/transcoding/chinese2unicode

 

posted @ 2021-07-12 13:52  papering  阅读(374)  评论(0编辑  收藏  举报