通过js简单实现将一个文本内容转译成加密文本
人气:0复制代码 代码如下:
<SCRIPT language=JavaScript>
<!--
var Words;
function SetWords(word)
{
Words = word.value;
}
function SetNewWords(form)
{
var NewWords;
NewWords = unescape(Words);
form.NewWords.value = NewWords;
}
function SetNewWords1(form)
{
var NewWords;
NewWords = escape(Words);
form.NewWords.value = NewWords;
}
// -->
</SCRIPT>
<body>
<table align=center>
<TR>
<form method=post>
<TD align=center>
<P><textarea cols=65 name=Word onchange=SetWords(this) rows=5></textarea></P>
<P><input name=uncode onclick=SetNewWords(this.form) type=button value="解密">
<input name=encode onclick=SetNewWords1(this.form) type=button value="加密">
</P>
<P><textarea cols=65 name=NewWords rows=5></textarea></P>
</form>
</td>
</tr>
</table>
</body>
加载全部内容