日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 前端技术 > javascript >内容正文

javascript

js怎么实现对html代码加密解密,javascript脚本加密解密及HTML转JS

發布時間:2025/3/13 javascript 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 js怎么实现对html代码加密解密,javascript脚本加密解密及HTML转JS 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

HTML

&

Javascript?相互轉換

<

body

>

HTML

&

Javascript?輸入

&

輸出

<

br

>

<

script

>

function?change()

...

{

code1.value="document.writeln(""+code0.value.replace(///g,"//").replace(///g,"//").replace(/'/g,"/'").replace(/"/g,"/"").split(' ').join(""); document.writeln("")+"");"}

function?rechange()

...

{

code2.value=code1.value.replace(/document.writeln("/g,"").replace(/");/g,"").replace(//"/g,""").replace(//'/g,"'").replace(g,"/").replace(g,"/")}

script

>

粘貼需要轉換的HTML代碼

<

br

>

<

textarea?id

=

"

code0

"

rows

=

"

10

"

cols

=

"

120

"

onpropertychange

=

"

change();

"

>

textarea

>

<

br

>

粘貼需要轉換的Javascript代碼

<

br

>

<

textarea?id

=

"

code1

"

rows

=

"

10

"

cols

=

"

120

"

onpropertychange

=

"

rechange();

"

>

textarea

>

<

br

>

由Javascript代碼生成的HTML代碼

<

br

>

<

textarea?id

=

"

code2

"

rows

=

"

10

"

cols

=

"

120

"

>

textarea

>

body

>

escape

&

unescape?加密

&

解密(可多次)

<

body

>

escape

&

unescape?加密

&

解密

<

br

>

<

textarea?id

=

"

code0

"

rows

=

"

16

"

cols

=

"

120

"

>

textarea

>

<

br

>

<

input?type

=

"

button

"

value

=

"

加密

"

onclick

=

"

code1.value=escape(code0.value);

"

>

<

input?type

=

"

button

"

value

=

"

解密

"

onclick

=

"

code1.value=unescape(code0.value);

"

>

<

input?type

=

"

button

"

value

=

"

二次加密

"

onclick

=

"

code1.value=escape(escape(code0.value));

"

>

<

input?type

=

"

button

"

value

=

"

二次解密

"

onclick

=

"

code1.value=unescape(unescape(code0.value));

"

>

<

input?type

=

"

button

"

value

=

"

三次加密

"

onclick

=

"

code1.value=escape(escape(escape(code0.value)));

"

>

<

input?type

=

"

button

"

value

=

"

三次解密

"

onclick

=

"

code1.value=unescape(unescape(unescape(code0.value)));

"

>

<

br

>

<

textarea?id

=

"

code1

"

rows

=

"

16

"

cols

=

"

120

"

>

textarea

>

<

br

>

<

input?type

=

"

button

"

value

=

"

加密

"

onclick

=

"

code1.value=escape(code1.value);

"

>

<

input?type

=

"

button

"

value

=

"

解密

"

onclick

=

"

code1.value=unescape(code1.value);

"

>

<

input?type

=

"

button

"

value

=

"

二次加密

"

onclick

=

"

code1.value=escape(escape(code1.value));

"

>

<

input?type

=

"

button

"

value

=

"

二次解密

"

onclick

=

"

code1.value=unescape(unescape(code1.value));

"

>

<

input?type

=

"

button

"

value

=

"

三次加密

"

onclick

=

"

code1.value=escape(escape(escape(code1.value)));

"

>

<

input?type

=

"

button

"

value

=

"

三次解密

"

onclick

=

"

code1.value=unescape(unescape(unescape(code1.value)));

"

>

body

>

encode

&

decode?加密

&

解密

<

body

>

encode

&

decode?加密

&

解密

<

br

>

<

script?language

=

"

javascript

"

>

script

>

<

textarea?id

=

"

code0

"

rows

=

"

16

"

cols

=

"

120

"

>

textarea

>

<

br

>

<

input?type

=

"

button

"

value

=

"

加密

"

onclick

=

"

code1.value=screncode(code0.value,'JS');

"

>

<

input?type

=

"

button

"

value

=

"

解密

"

onclick

=

"

code1.value=strdec(code0.value);

"

>

<

br

>

<

textarea?id

=

"

code1

"

rows

=

"

16

"

cols

=

"

120

"

>

textarea

>

<

br

>

<

input?type

=

"

button

"

value

=

"

加密

"

onclick

=

"

code1.value=screncode(code1.value,'JS');

"

>

<

input?type

=

"

button

"

value

=

"

解密

"

onclick

=

"

code1.value=strdec(code1.value);

"

>

body

>

encodeURI

&

decodeURI?加密

&

解密

<

body

>

encodeURI

&

decodeURI?加密

&

解密

<

br

>

<

textarea?id

=

"

code0

"

rows

=

"

16

"

cols

=

"

120

"

>

textarea

>

<

br

>

<

input?type

=

"

button

"

value

=

"

加密

"

onclick

=

"

code1.value=encodeURI(code0.value);

"

>

<

input?type

=

"

button

"

value

=

"

解密

"

onclick

=

"

code1.value=decodeURI(code0.value);

"

>

<

input?type

=

"

button

"

value

=

"

二次加密

"

onclick

=

"

code1.value=encodeURI(encodeURI(code0.value));

"

>

<

input?type

=

"

button

"

value

=

"

二次解密

"

onclick

=

"

code1.value=decodeURI(decodeURI(code0.value));

"

>

<

input?type

=

"

button

"

value

=

"

三次加密

"

onclick

=

"

code1.value=encodeURI(encodeURI(encodeURI(code0.value)));

"

>

<

input?type

=

"

button

"

value

=

"

三次解密

"

onclick

=

"

code1.value=decodeURI(decodeURI(decodeURI(code0.value)));

"

>

<

br

>

<

textarea?id

=

"

code1

"

rows

=

"

16

"

cols

=

"

120

"

>

textarea

>

<

br

>

<

input?type

=

"

button

"

value

=

"

加密

"

onclick

=

"

code1.value=encodeURI(code1.value);

"

>

<

input?type

=

"

button

"

value

=

"

解密

"

onclick

=

"

code1.value=decodeURI(code1.value);

"

>

<

input?type

=

"

button

"

value

=

"

二次加密

"

onclick

=

"

code1.value=encodeURI(encodeURI(code1.value));

"

>

<

input?type

=

"

button

"

value

=

"

二次解密

"

onclick

=

"

code1.value=decodeURI(decodeURI(code1.value));

"

>

<

input?type

=

"

button

"

value

=

"

三次加密

"

onclick

=

"

code1.value=encodeURI(encodeURI(encodeURI(code1.value)));

"

>

<

input?type

=

"

button

"

value

=

"

三次解密

"

onclick

=

"

code1.value=decodeURI(decodeURI(decodeURI(code1.value)));

"

>

body

>

與50位技術專家面對面20年技術見證,附贈技術全景圖

總結

以上是生活随笔為你收集整理的js怎么实现对html代码加密解密,javascript脚本加密解密及HTML转JS的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。