【发布时间】:2018-08-07 23:38:50
【问题描述】:
我多年前开发了一个 wordpress 主题,并将此脚本放入 script.js 文件中:
$(document).ready(function() {
$('.spampro').each(function() {
var email = $(this).find('.n').text() + "@" + $(this).find('.e1').text() + "." + $(this).find('.e2').text();
$(this).html("<a href=\"mailto:" + email + "\">" + email + "</a>");
});
});
});
});
几年后,当我想再次使用它时,我不记得我过去是如何保护我的 mailto/email 地址的。我对我写的时候有一点记忆:myemail@adress.com 它是在页面源代码中编码的。
我搜索了.spampro,但没有成功。也许你们中的任何人都熟悉我是如何使用它的,因为我不是代码向导。
【问题讨论】:
-
这对今天在您的网站上运行 JS 的爬虫没有多大帮助。
标签: javascript jquery mailto