Need help replacing ampersand
It wasn't the usual hide email address scripts. What it did was replace what ever symbol or series of characters you wanted with the ampersand (@) symbol.
Can anyone help me out?
The ampersand is the "&" character; the amphora is the "@" character. And you can replace characters or patterns of characters using the String.replace() method and regular expressions:
alert ('Fee, fie, foe, fum'.replace (/e/g, '@'))
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
I'm not sure how effective this would be, but couldn't you just replace the @ character with this:
That will produce the @ symbol but may hide it from bots. On my blog, I simply replace the @ symbol with the word "at". It gets the point accross and the bots are none the wiser.
Every fight is a food fight when you’re a cannibal.
I'm trying to make a mailto: link where they can click on the name of the person and get their default email program to send a message. If I put their full email in the mailto:, I don't want spambots to collect their email address.
I can't use the @ because that only creates the image on the screen but it doesn't let me create that link.
What I'm trying to do is switch something like address_*_something.com to email@example.com.
Yes I was wrong, it wasn't the ampersand but the amphora symbol. Thanks for the correction.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)