显示电子邮件地址和联系电话的安全方法 [英] Safe way to display email address and contact number

查看:115
本文介绍了显示电子邮件地址和联系电话的安全方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何技巧可以在联系表网页上显示联系电话号码和电子邮件?我在页面上有一个联系表,但也想给人们选择直接打电话或发电子邮件的选项.目前,它们以纯文本显示,但认为这是不安全的,并且对爬网该网站以获取此类信息的漫游器开放.

Are there any tips to display a contact telephone number and email on a contact form webpage? I have a contact form on the page, but also want to give people the option of being able to call or email directly. Currently they are displayed in plain text but feel this is insecure and open to bots crawling the site for this kind of info.

有安全的方法吗?

谢谢

推荐答案

这是使用Javascript的一种方法:

Here is one way to do it using Javascript:

<script language=JavaScript type="text/javascript">
<!--
var user = "yourname";
var host = "yourdomain.com";
var link = user + "@" + host;
document.write("<a hre" + "f=mai" + "lto:" + user + "@" + host + "><b>" + link + "</b></a>");
--> </script>

这篇关于显示电子邮件地址和联系电话的安全方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆