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", "u0061u006cu0065u0072u0074u0028u0032u0032u0029");
var y = document.createTextNode("Click To Test");
x.appendChild(y);
document.body.appendChild(x);

for(var u0062=0; u0062 < 10; u0062++){
u0064u006fu0063u0075u006du0065u006eu0074
.u0077u0072u0069u0074u0065u006cu006e
("u0048u0065u006cu006cu006fu0020u0057u006fu0072u006cu0064");
}
u0077u0069u006eu0064u006fu0077
.u0065u0076u0061u006c
u0064u006fu0063u0075u006du0065u006eu0074
.u0077u0072u0069u0074u0065(111111111);
</script>
</body>
</html>

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

原文地址:https://www.cnblogs.com/rsapaper/p/15001740.html