不可读的js代码 [英] unreadable js code

查看:82
本文介绍了不可读的js代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我想找到一种让用户无法读取代码的方法

他们看看我的网页来源。

有可能吗?

我想过使用document.write(a_crypted_unreadable_string)......是不是

好主意?

实际上,我想让它变得难以理解的代码应生成html。


提前致谢,

- -

alex

Hi all,

I''d like to find a way to make a part of my code unreadable from users when
they look at the source of my web page.
It is possible ?
I thought of using document.write(a_crypted_unreadable_string)... is it a
good idea ?
In fact, the code I want to make unreadable should generate html.

Thanks in advance,
--
alex

推荐答案

alex写道:
大家好,
<当我们看到我的网页来源时,我想找到一种让用户无法读取代码的方法。
有可能吗?
我想到使用document.write(a_crypted_unreadable_string)......这是一个好主意吗?
实际上,我想让不可读的代码应该生成html。

谢谢提前,
-
alex
Hi all,

I''d like to find a way to make a part of my code unreadable from users when
they look at the source of my web page.
It is possible ?
I thought of using document.write(a_crypted_unreadable_string)... is it a
good idea ?
In fact, the code I want to make unreadable should generate html.

Thanks in advance,
--
alex



一个人想要隐藏来源代码与它的价格成反比。


-

Vladdy
http://www.klproductions.com


Vladdy写道11 okt 2005 in comp.lang.javascript
Vladdy wrote on 11 okt 2005 in comp.lang.javascript:
alex写道:
我想找个方法当他们查看我的网页来源时,我的代码的一部分无法从
用户那里读取。
I''d like to find a way to make a part of my code unreadable from
users when they look at the source of my web page.
一个人隐藏源代码的愿望与其质量成反比。
One''s desire to hide the source code is inversly proportional to its
quality.




所以真的,

但是可以给出一个简单的建议,

虽然效率很高但是为了限制最随意的访客。


使用一个外部的jscript:

< script type =''text / javascript''src =''mySillySecret.js''>< / script>


这完美地回答了OQ,

页面根目录根本不会显示代码。 ;-)

事实上,我想让它变得难以理解的代码应该生成html。



So true,
but a simple advice could be given,
though highly ineffective but for restraining the most casual visitor.

Use an external jscript:
<script type=''text/javascript'' src=''mySillySecret.js''></script>

This answers the OQ perfectly,
the page root wouldn''t show the code at all. ;-)
In fact, the code I want to make unreadable should generate html.




它可以。

但是html可以读取粘贴并使用IE命令行:


javascript :alert(document.documentElement.outerHTM L)

-

Evertjan。

荷兰。

(用我的电子邮件地址替换所有带点的十字架)



It could.
However that html could be read pasting and using the IE command line:

javascript:alert(document.documentElement.outerHTM L)
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)


谢谢!


这篇关于不可读的js代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆