Search - Articles
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Tuesday, March 03, 2009
Dev Articles
Search Directory
ASP.NET
VB.Net
C-Sharp
SQL Server
 

FREE 12 month online training for ASP.NET & MS Expression Studio and a Free copy of MS Expression Web with Windows Server Purchase
How to Hide your Email Address from User using JavaScript in ASP.Net (Part 14)

Author: DevASP
Download Source Code : 405_HideEmailAddress.zip

In this article you will learn that how can you hide your email address on page.

Add the following code in <head> tag:

<script language=javascript >

function email(name, domain, suffix, text)

{

var address = name + "\u0040" + domain + "." + suffix;

var url = "mailto:" + address;

if( ! text )

{

text = address;

}

document.write("" + text + "");

}

</script>

 

<form id="Form1" method="post" runat="server">

<p>

<script type="text/javascript">

email("mail", "devasp", "net", "E-mail Me")

</script>

</p>

<p>

<script type="text/javascript">

email("me", "devasp", "org", "E-mail Me")

</script>

</p>

<p>

<script type="text/javascript">

email("abc", "efg", "org", "E-mail Me")

</script>

</p>

<p>

<script type="text/javascript">

email("bill", "example", "org", "E-mail Me")

</script>

</p>

 

</div>

</form>

</body>

   
Add Article Comment:
Name :
Email Address :
   
Comments :
 
   
<< How to open New Window with different Window Properties on Arrow keys using JavaScript in ASP.Net (Part 13)

Disclaimer - Privacy
© 2002-2014 DevASP.net