HTML源代码加密/解密工具

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>HTML源代码加密/解密工具_手册_e路网</title>
<SCRIPT language=JavaScript>
<!-- Begin
function viewSource() {
document.getSource.view.value="请稍后....";
setTimeout("document.getSource.view.value='查看源代码'",6000);
window.location.href= "view-source:" + document.getSource.url.value;
return false;
}
// End -->
</SCRIPT>

<style type="text/css">
<!--
body {
 font-size: 12px;
 color: #000000;
}
td {
 font-size: 12px;
 color: #000000;
}
-->
</style>
</head>
<body topmargin="0" leftmargin="0">
<script language="javascript" src="/script/js_web_menu.js"></script>
-&gt; <strong><font color="#FF0000">HTML源代码加密/解密工具<hr size="1">
</font></strong>
<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="0" width="553" height="319">
    <tr>
      <td width="100%" height="319">

<div align="center">
 <center>

<TABLE cellPadding=8 width="553" border=0 style="border-collapse: collapse" bordercolor="#111111" cellspacing="0">
 <TR>
<TD width="100%" style="font-size: 9pt; color: #333333">


<FORM name=getSource onsubmit="return viewSource();">
 <P>输入网址,可查看对方html源码:<INPUT size=47 value=http:// name=url style="BORDER-RIGHT: black 1pt solid; BORDER-TOP: black 1pt solid; FONT-SIZE: 8pt; BORDER-LEFT: black 1pt solid; BORDER-BOTTOM: black 1pt solid; FONT-FAMILY: Tahoma,Verdana,Arial">&nbsp;<INPUT onmouseover=LightOn(this) onmouseout=LightOut(this) type=submit value=查看源代码 name=view style="font-size: 9pt; height: 18px; border-color: #cccccc; border-width: 1px; padding: 1px; background-color: #96a096"></P></FORM></TD></TR>
 <FORM name=pad method=POST align="center" style="text-align: center">

 
</TD></TR>
 <TR>
<TD width="537" style="font-size: 9pt; color: #333333">
<p style="text-align: left; margin-bottom: 0">将要处理的HTML文档的源代码复制到下面的文本框内,可以进行多次加密解密:
 <SCRIPT language=JavaScript> 
<!-- 
var i=0; 
var ie=(document.all)?1:0; 
var ns=(document.layers)?1:0; 

function initStyleElements()

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; 

function LightOn(what) 

if (ie) what.style.backgroundColor = '#9ab6c4'; 
else return; 

function LightOut(what) 

if (ie) what.style.backgroundColor = '#96a096'; 
else return; 

function generate()

code = document.pad.text.value; 
if (code) 

document.pad.text.value='/n/n/n 正在加密代码,请稍后/n/n…………………………'; 
setTimeout("compile()",1000); 

else alert('似乎忘了输入源文件的HTML代码!!!') 
}
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++; 
alert("此次操作对HTML代码加密了 "+i+" 次!"); 

function unpass()
{
if(document.pad.text.value.length>0){
code = document.pad.text.value;
alert("注意:/n 解密完成后记得去掉多余的部分:/n/n<script>/n<!--/ndocument.write(unescape(/"/n/n------只要此内HTML代码------/n/n/"/)/)/;/n//-->/n<//script>/n/n可以多次解密到显示标准的HTML代码!");
document.pad.text.value=unescape(code);
}
else alert('这样的空代码还要我来解吗!?') 
}
function selectCode()

if(document.pad.text.value.length>0) 

document.pad.text.focus(); 
document.pad.text.select(); 

else alert('都没有代码还要选择什么!!!') 

function preview()

if(document.pad.text.value.length>0) 

pr=window.open("","Preview","scrollbars=1,menubar=1,status=1,width=500,height=350,left=100,top=100"); 
pr.document.write(document.pad.text.value); 

else alert('空白代码不用预览啦!!!') 

function uncompile()

if (document.pad.text.value.length>0) 

source=unescape(document.pad.text.value); 
document.pad.text.value=""+source+""; 

else alert('') 

// --> 
</SCRIPT>

 </p>

 <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
 <TD width="100%" style="font-size: 9pt; color: #333333">
 <p><TEXTAREA style="BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; FONT-SIZE: 9pt; BORDER-LEFT: 1px double; WIDTH: 100%; COLOR: #555566; BORDER-BOTTOM: 1px double; BACKGROUND-COLOR: #ffffee" name=text rows=15 cols=30></TEXTAREA>
 </p>
<P align="center">
<INPUT onmouseover=LightOn(this) onclick=generate() onmouseout=LightOut(this) type=button value=加密 name=compileIt style="font-size: 9pt; height: 18px; border-color: #cccccc; border-width: 1px; padding: 1px; background-color: #96a096">&nbsp;&nbsp; 
<INPUT onmouseover=LightOn(this) onclick=selectCode() onmouseout=LightOut(this) type=button value=全选 name=select style="font-size: 9pt; height: 18px; border-color: #cccccc; border-width: 1px; padding: 1px; background-color: #96a096">&nbsp;&nbsp; 
<INPUT onmouseover=LightOn(this) onclick=unpass() onmouseout=LightOut(this) type=button value=解密 name=unpas style="font-size: 9pt; height: 18px; border-color: #cccccc; border-width: 1px; padding: 1px; background-color: #96a096">&nbsp;&nbsp; 
<INPUT onmouseover=LightOn(this) onclick=preview() onmouseout=LightOut(this) type=button value=预览 name=view style="font-size: 9pt; height: 18px; border-color: #cccccc; border-width: 1px; padding: 1px; background-color: #96a096">&nbsp;&nbsp; 
<INPUT onmouseover=LightOn(this) onmouseout=LightOut(this) type=reset value=清空 name=clear style="font-size: 9pt; height: 18px; border-color: #cccccc; border-width: 1px; padding: 1px; background-color: #96a096"><p></p>
 
 </TD></TR></TBODY></TABLE></TD></TR></TABLE>

 </center>
</div>

</td>
    </tr>
  </table>
  </center>
</div>

</body>

</html>

 

你可能感兴趣的:(JavaScript,html,加密,解密,border,compilation)