LoginSignup
0
1

More than 1 year has passed since last update.

Mailto: での公開アドレスに対するスパムボットの巡回・収集を防ぐ

Last updated at Posted at 2023-01-05

HTML

<a href="mail+mail.com" class="mailto"><span>mail</span>mail.com</a>

jQuery

 $( '.mailto' ).click( function() {
            var address = $( this ).attr( 'href' ).replace( '+', '@' );
            location.href = 'mailto:' + address;
            return false;
});

CSS

.mailto span:after {
    content:'@';
}
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1