猿问

关于JavaScript 十六进制代码输出

本人JS是新手,有个问题不解。
我看到有些人会加密JS代码,里面有很多诸如下面这样的加密代码:


var _defc33 = ["x61x48x52x30x63x44x6fx76x4cx33x64x33x64x79x35x77x64x58x4ax7ax5ax58x5ax68x62x47x78x6cx65x53x35x6ax62x69x38x3d", "x68x6Fx73x74x6Ex61x6Dx65", "x6Cx6Fx63x61x74x69x6Fx6E", "x69x6Ex64x65x78x4Fx66", "x64x65x63x6Fx64x65", "x73x72x63", "x69x6Dx67", "x67x65x74x45x6Cx65x6Dx65x6Ex74x73x42x79x54x61x67x4Ex61x6Dx65", "x68x74x74x70x3ax2fx2fx6ax73x68x2ex70x75x72x73x65x76x61x6cx6cx65x79x2ex63x6ex2fx73x6cx69x64x65x2ex70x68x70x3fx72x6ex64x3dx31x26x69x6dx67x3d", "x55x52x4C"];
var s = _defc33[0];

我发现这些十六进制代码不仅可以正常解析,还可以直接使用


for(i=0;i<_defc33.length;i++){

document.write(i+"="+_defc33[i]+"");

}

输出值到HTML页面上。

我试着用console.log()也能正常输出。我想请教一下JS是不是可以自动转换十六进制代码。


慕盖茨4494581
浏览 1039回答 1
1回答
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答