社区
JavaScript
帖子详情
怎样不让用户查看网页的JS代码?
woxoxow
2002-11-26 09:39:23
怎样不让用户查看网页的JS代码?
...全文
313
18
打赏
收藏
怎样不让用户查看网页的JS代码?
怎样不让用户查看网页的JS代码?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
18 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
emu
2002-12-06
打赏
举报
回复
是啊,连我的对称加密都让秋水给破解了,天!
要不作成pdf吧,就可以加密了,一样可以网上发布,还跨平台跨浏览器呢!
wangxj0600
2002-12-06
打赏
举报
回复
好像还没有看到过没有认能破的js代码
hui_feng
2002-12-06
打赏
举报
回复
没可能,有可能的话也给我源码。
sduwjr
2002-12-02
打赏
举报
回复
客户端的脚本怎么还要保密啊?一般还是单独写.js文件,路径最好怪一点喽。至于屏蔽右键,屏蔽查看源码,好像难不到稍微懂一点的人。
emu
2002-12-02
打赏
举报
回复
呵呵,人家都说“一般的菜鸟绝对看不出来”了,何必对号入座呢?
shoyour
2002-12-02
打赏
举报
回复
哈哈,我马上就可以写个解密的出来,这是什么宝呢,除非你加密得连IE也不认识它了,这样我就没办法了~!
knifewgh
2002-12-02
打赏
举报
回复
不可能
wgrabob1
2002-12-02
打赏
举报
回复
谁说不行的啊
给你个宝:
<html>
<head>
<title>源代码解密</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function viewSource() {
document.getSource.view.value="Please wait!";
setTimeout("document.getSource.view.value='View Source!'",6000);
window.location.href= "view-source:" + document.getSource.url.value;
return false;
}
// End -->
</script>
</head>
<body bgcolor="#000000" text="#999999" link="#33FF33" vlink="#33FF33" alink="#33FF33">
<center>
<form name=getSource onSubmit="return viewSource();">
<font size=2> 输入网址按查看钮 </font>
<input type=text name=url value="http://">
<input type=submit name=view value="查看">
</form>
</center>
<SCRIPT language=JavaScript>
<!--
var i=0;
var ie=(document.all)?1:0;
var ns=(document.layers)?1:0;
function initStyleElements() /* Styles for Buttons Init */
{
var c = document.pad;
if (ie)
{
//c.text.style.backgroundColor="#DDDDDD";
c.compileIt.style.backgroundColor="#C0C0A8";
c.compileIt.style.cursor="hand";
c.select.style.backgroundColor="#C0C0A8";
c.select.style.cursor="hand";
c.view.style.backgroundColor="#C0C0A8";
c.view.style.cursor="hand";
c.retur.style.backgroundColor="#C0C0A8";
c.retur.style.cursor="hand";
c.clear.style.backgroundColor="#C0C0A8";
c.clear.style.cursor="hand";
}
else return;
}
/* Buttons Enlightment of "Compilation" panel */
function LightOn(what)
{
if (ie) what.style.backgroundColor = '#E0E0D0';
else return;
}
function FocusOn(what)
{
if (ie) what.style.backgroundColor = '#EBEBEB';
else return;
}
function LightOut(what)
{
if (ie) what.style.backgroundColor = '#C0C0A8';
else return;
}
function FocusOff(what)
{
if (ie) what.style.backgroundColor = '#DDDDDD';
else return;
}
/* Buttons Enlightment of "Compilation" panel */
function generate() /* Generation of "Compilation" */
{
code = document.pad.text.value;
if (code)
{
document.pad.text.value='Compiling...Please wait!';
setTimeout("compile()",1000);
}
else alert('请先把需待加密的代码copy到此框中')
}
function compile() /* The "Compilation" */
{
document.pad.text.value='';
compilation=escape(code);
document.pad.text.value="<script>\n<!--\ndocument.write(unescape(\""+compilation+"\"));\n//-->\n<\/script>";
i++;
if (i=1) alert("代码已编译1次!");
else alert("代码已编译"+i+"次!");
}
function selectCode() /* Selecting "Compilation" for Copying */
{
if(document.pad.text.value.length>0)
{
document.pad.text.focus();
document.pad.text.select();
}
else alert('无任何内容被选中!')
}
function preview() /* Preview for the "Compilation" */
{
if(document.pad.text.value.length>0)
{
pr=window.open("","Preview","scrollbars=1,menubar=1,status=1,width=700,height=320,left=50,top=110");
pr.document.write(document.pad.text.value);
}
else alert('无任何内容可供预览!')
}
function uncompile() /* Decompiling a "Compilation" */
{
if (document.pad.text.value.length>0)
{
source=unescape(document.pad.text.value);
document.pad.text.value=""+source+"";
}
else alert('请把需待还原的代码copy到此框中!')
}
// -->
</SCRIPT>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD width="100%">
<FORM method=post name=pad align="center">
<div align="center">
<TEXTAREA cols=58 name=text rows=20 style="BACKGROUND-COLOR: #ebebeb; WIDTH: 95%"></TEXTAREA>
<BR>
<INPUT name=compileIt onclick=generate() onmouseout=LightOut(this) onmouseover=LightOn(this) type=button value=加密>
<INPUT name=select onclick=selectCode() onmouseout=LightOut(this) onmouseover=LightOn(this) type=button value=选中>
<INPUT name=view onclick=preview() onmouseout=LightOut(this) onmouseover=LightOn(this) type=button value=预览>
<INPUT name=retur onclick=uncompile() onmouseout=LightOut(this) onmouseover=LightOn(this) type=button value=还原>
<INPUT name=clear onmouseout=LightOut(this) onmouseover=LightOn(this) type=reset value=清除>
</div>
</FORM></TD></TR></TBODY></TABLE>
</body>
</html>
试试看,再改改参数一般的菜鸟绝对看不出来
pyz8000
2002-12-02
打赏
举报
回复
没办法,,不过这个方法可以参考。
把代码以xx.js文件单独存放,然后调用,
假设你在index.htm在调用,
那么把<script language=javascript src=xx.js></script>放在隐蔽的地方,然后在index.htm中输一些你自己都看不懂的类似xx.js的没用的代码,
让查看原代码的人混淆~~~~~~~~
wenn
2002-12-02
打赏
举报
回复
JS是客户端的,怎能不让人知道呢,设计时就注定是要大家知道的了
woyaonipeizhewo
2002-11-27
打赏
举报
回复
忽忽~~~``
carion
2002-11-27
打赏
举报
回复
不可能
bncharm
2002-11-27
打赏
举报
回复
技术应该共享
emu
2002-11-27
打赏
举报
回复
方成的webExcel有300多k的js代码,都可以随便拿来研究了,有什么宝贝的不得了的脚本要保密呢?
不过那300多k的js我还真的没能看下来呵呵。
vbtj
2002-11-26
打赏
举报
回复
要相互交流啊!
这样才能进步啊!
wuziqi_puyue
2002-11-26
打赏
举报
回复
to emu(ston)
妙啊!!!!
还有什么更好的
emu
2002-11-26
打赏
举报
回复
简单的:不要写JS代码咯
有效的:写的自己都看不懂呵呵
更好的:让别人随便看咯,别人就没多大兴趣去看了。
此外的:始终有破解的办法。
meizz
2002-11-26
打赏
举报
回复
差的代码没人去看,好的代码大家共享吗!
1500个常用JavaScript特效
编辑整理的1500个前端开发常用JavaScript特效chm,包括了菜单效果、按钮效果、鼠标效果、页面效果、字符排版、计算、小游戏等的
网页
特效集,都是些较简单的
JS
特效。
60个
网页
特效(
js
+flash)
在这个几盒内包括很多
网页
中常用的效果比如:顶部收缩广告效果、定时关闭的背投广告
代码
、
JS
图片卷帘门效果、随数字快速翻动幻灯
代码
等等,精心收藏的,分享出来,希望大家喜欢!
js
用户
界面
代码
库
以 jQuery 为基础的开源 JavaScript
网页
用户
界面
代码
库
MyEclips中
JS
代码
提示插件(spket)
MyEclips中
JS
代码
提示插件(spket)MyEclips中
JS
代码
提示插件(spket)MyEclips中
JS
代码
提示插件(spket)
犀利的
JS
,HTML
网页
效果大全
犀利的
JS
,HTML
网页
效果大全。。犀利的
JS
,HTML
网页
效果大全。。嫌太大的。。还有个小全。。
JavaScript
87,994
社区成员
224,689
社区内容
发帖
与我相关
我的任务
JavaScript
Web 开发 JavaScript
复制链接
扫一扫
分享
社区描述
Web 开发 JavaScript
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章