Home > Web Front-end > JS Tutorial > body text

另一种希望别人无法修改js的代码_黑客性质

WBOY
Release: 2016-05-16 19:14:04
Original
1183 people have browsed it

我们对js加密的目的是希望别人无法修改,那么我们可以在JS的复杂度上下点功夫,用模块化的开发,这个函数引用那个函数,这个对象继承自那个对象.....反反复复,很快别人就会晕掉.......当然以后自己调试或者修改的时候也会晕掉..........我随便说说.....大家不要打我...

其实俺想说的是,不希望别人修改,那么可以在JS的很多位置上加上一个自身有效性的检查,如果不对,那么就开始这里调用那里的把别人绕晕掉...

当然了,这个检查做的是否隐蔽,检查不符合后的善后是否完美就是程序员自己仔细思考的事了,偶只是给个想法哈哈.下面是例子,只是表达想法,呵呵......

IE Only 


[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
  
FF Only

[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!