我尝试使用Chrome扩展程序中的javascript,并遇到一些问题。
代码的大部分,包括编码数组
var _0x6790 = ["\x44\x4F\x4D\x53\x75\x62\x74\x72\x65\x65\x4D\x6F\x64\x69\x66\x69\x65\x64", "\x67\x65\x74", "\x3A\x76\x69\x73\x69\x62\x6C\x65", "\x69\x73", "\x24\x61\x70\x70\x6C\x79\x46\x6F\x72\x4C\x6F\x6F\x74\x42\x75\x74\x74\x6F\x6E", "\x65\x6E\x61\x62\x6C\x65\x64", "\x61\x75\x74\x6F\x63\x6C\x69\x63\x6B\x69\x6E\x67", "\x73\x65\x74\x74\x69\x6E\x67\x73", "\x6D\x61\x67\x69\x63", "\x63\x6C\x69\x63\x6B", "\x5F\x62\x69\x64\x49\x6E\x74\x65\x72\x6E\x61\x6C\x44\x65\x6C\x61\x79", "\x61\x75\x74\x6F\x62\x69\x64\x64\x69\x6E\x67", "\x23\x67\x6F\x6C\x64\x73\x6C\x69\x64\x65\x72", "\x73\x65\x74\x42\x69\x64", "\x6F\x6E", "\x5F\x69\x6E\x73\x74\x61\x6E\x63\x65"];
并使用如下:
$(document)[_0x6790[14]](_0x6790[0], function() {
如何解码数组中的值?
答案 0 :(得分:-1)
这是一个可以帮助您的worked demo:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<script>
function hex2a(hex) {
var str = '';
for (var i = 0; i < hex.length; i += 2) str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
document.getElementById('result').innerHTML=str;
}
</script>
</head>
<body>
<h1><u>Hex Decoder</u></h1><br>
<h3><u>Hex code</u></h3>
<textarea id="hexcode" rows="4" cols="50"></textarea><br>
<button type="button" onclick="hex2a(document.getElementById('hexcode').value)">decode</button><br>
<h3><u>Result</u></h3>
<textarea id="result" rows="4" cols="50"></textarea>
</body>
</html>