A Spambot is a program that searches the internet looking for email addresses. When it finds them, they are added to lists of email addresses that are then used to send Spam emails or sold on to Spammers. The easiest way for a Spambot to find this information is when an email address is hard-coded into the HTML of a website.
var contactform = document.getElementById('contactform'); contactform.setAttribute('action', 'https://formspree.io/' + 'your' + '.' + 'name' + '@' + 'somedomain' + '.' + 'com'); });
This will select the section of HTML code to be modified using document.getElementById('contactform') . It will then use string concatenation to construct the email address as
email@example.com insert it into the form as an attribute by using contactform.setAttribute .
This is a straightforward trick to reduce harvesting of email addresses from your websites. It's definitely worth doing.