Var string;
Function showUnico(){
if(document . getelementbyid(" before ")value . length & gt; 0){
str = escape(document . getelementbyid(" before ")。 Value);
document.getElementById("after ")。 value = str
}
Else alert ("Please enter the code to be encrypted");
}
Function showHtml(){
if(document . getelementbyid(" after ")value . length & gt; 0){
str = unescape(document . getelementbyid(" after ")。 Value);
document . getelementbyid(" before ")。 value = str
}
Else alert ("Please enter a password to decrypt");
}
Function clearBoth(){
document . getelementbyid(" before ")。 Value = "";
document.getElementById("after ")。 Value = "";
}
& lt/script & gt;
& ltbody & gt
& lt center & gt
& lt table & gt
& lttr & gt
& ltth & gt before encryption
& ltth & gt after encryption
& lt/tr & gt;
& lttr & gt
& lttd & gt
& lttextarea id = " before " style = " width:200 px; Height:174px "></textarea >
& lt/TD & gt;
& lttd & gt
& lttextarea id = " after " style = " width:200 px; Height:174px "></textarea >
& lt/TD & gt;
& lt/tr & gt;
& lt/table & gt;
& ltbr & gt
& ltinput type = " button " value = " encryption " onclick = " showUnico()" & gt;
& ltinput type = " button " value = " decryption " onclick = " show html()" & gt;
& ltinput type = " button " value = " empty all " onclick = " clear both()" & gt;
& lt/center & gt;
& lt/body & gt;