Recently, small size elder brother a little busy Ah, therefore, also did not want to update the content! Want to visit my blog "Yin People" do not spit groove I ah,,,,,
However, today, small-size elder brother used to me a relatively unfamiliar HTML attribute, is the mailto attribute, said to be a property bar, is not exactly correct. Because it is worth the prefix to use as an href attribute.
Its approximate function is to add a click effect to an email address, click on the email address, will jump directly to or into a computer on a mailbox software. Convenient for users to send mail more quickly and without error!
Don't say much nonsense, just go to the example!
HTML structure:
<!doctype html>
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 ">
<title>html mailto Property Test </title>
<body>
<!--<a href= "Mailto:[email protected]" target= "_blank" >[email protected]</a>-->
<a href= "Mailto:[email protected]?subject=test&[email protected]&body=use mailto sample" target= "_blank" >[email protected]</a><!--mailto property requires a mail client or software on your computer, otherwise you can only copy the email address and send it on the Web page or on the QQ mailbox.
</body>
See the structure, is not bright very simple and practical ah? Of course not, he has a lot of properties and features to add!
Here's how to use it in detail:
1. Add a default title to a message
<a href= "mailto:[email protected]?subject= mail default title" >[email protected]</a>
2. Add the default CC address to the message
<a href= "Mailto:[email protected][email protected]" >[email protected]</a>
3. Add a default BCC address for mail
<a href= "Mailto:[email protected][email protected]" >[email protected]</a>
4. Add the default content to the message
<a href= "Mailto:[email protected]?body= welcome you to Phplamp Blog station-http://www.phplamp.org" >[email protected]</a>
5. Multiple email addresses
<a href= "Mailto:[email protected],[email protected]" >[email protected]</a>
6. To a comprehensive type: Add the default cc address, title, content
<a href= "mailto:[email protected][email Protected]&subject=phplamp Blog Station &body= welcome you to Phplamp Blog station-http:// www.phplamp.org ">[email protected]</a>
As can be seen from the above example, if there are multiple default values to add, and the mail address is connected to the character "?", the default value of the connection between the symbol is "&".
But the point I want to say is that this feature is for clients or software that has a message on the user's computer. Otherwise, users will need to copy the email address, and then manually paste the address on the Web page or QQ mailbox to send the message.
There is a different browser on the resolution of this property, Firefox will pop up a prompt box lets you choose what mail software to use to send mail. IE will pop up a warning box to tell you that there are no related mail software on your computer. Google and other browsers if the computer does not search for the corresponding mail software or client. There is no prompt. It will require the user to manually operate by themselves.
This article is from the "focus on Technology focus Front" blog, be sure to keep this source http://oxoxo.blog.51cto.com/9301862/1636572
An analysis of the usage of mailto attribute in HTML