Because of the prevalence of spam, I wanted to encrypt the email address and put it on the web page. I have used such a tool before, but I couldn't find it yesterday, so I went online to look for it. I found such an encryption tool in the sky, but the result turned out to be Registration, such a simple function requires registration, my god ~, so I wrote one using JS. It is very simple. The code is as follows:
function getEmail(email)
{
var r = "";
for (i=0;i<email.length;i++)
{
r += "&#" + email.charCodeAt(i);
}
return r;
}
The complete web version is as follows: