43. HTML--a tag mailto mailbox attribute usage

Detailed explanation of the usage of mailto in HTML attribute tag

 
As we all know, mailto is a very practical html tag in web design and production. Many friends who have personal web pages like to write their e-mail addresses in prominent positions on the website, so that once the web browser clicks with the mouse, the After the super connection composed of mailto, the default email client software in the current computer system, such as OutLook Express and Foxmail , can be automatically opened . Of course, the use of the mailto label is not only as simple as the above, but it also has other applications. In order to help users have a comprehensive understanding of the mailto label, the author will make a detailed summary of the use of the mailto label, and hope to share with you!

1. If we create a hyperlink like "mailto: [email protected]" in the web page, and click the hyperlink with the mouse, the browser will automatically call the system default mail client program, and at the same time The recipient's address is automatically written in the recipient setting column of the email editing window, while other contents are blank, leaving it to the visitor to fill in by himself;

2. When you click the email hyperlink, you hope that in the email editing window that the system automatically opens, in addition to automatically filling in the content in the recipient address column, you can also automatically fill in yourself in the CC address column. If you need an email address, you can directly insert a statement like "mailto: [email protected][email protected]" into the html source code of the web page, where [email protected] will automatically appear in the In the recipient address bar, [email protected] will automatically appear in the CC address bar;

3. If you want to automatically fill in the subject content of the email in the pop-up email editing window, you can use an html statement like "mailto: [email protected]?subject='mailto' application skills pick up zero", When the browser clicks the email hyperlink composed of this statement with the mouse, [email protected] will automatically appear in the recipient address bar of the subsequently opened mail editing window, and "'mailto" will automatically appear in the subject setting bar. 'Applying skills to pick up zero' such content;

4. If you want to enter multiple e-mail addresses in the recipient's address bar, you can use a statement like "mailto: [email protected]; [email protected]" to remember each e-mail address. The emails are separated by ";", so that when the browser clicks the email hyperlink created by this statement, [email protected], bbb and [email protected] will appear in the recipient address bar of the pop-up email editing window at the same time. Recipient addresses such as @liehuo.net, viewers can send emails to these people at the same time;

5. The email addresses that appear in the web pages are often searched by some automatic search programs such as "mail-robot", so that others can easily use the searched email addresses to send you all kinds of spam, in order to To keep these spam away thousands of miles away, we can write the email address published on the web page in ASCII form, and remember that "&#" must be added in front of each ASCII code, for example, we use it in web pages If a statement such as "mailto: [email protected]" is used to create an email hyperlink, after clicking the hyperlink, we find that aaa@liehuo will still be displayed in the recipient's address bar in the subsequently opened mail sending and receiving window. .net, and other automatic email search tools can not correctly identify such ASCII codes, so the various spam emails of unknown origin received by users will be greatly reduced;

6. Under normal circumstances, when the browser clicks the email hyperlink, the system only automatically fills in the content in the recipient's address bar in the email client software that is opened by default, while the other setting columns are still blank. If you also want to automatically fill in the subject, cc, bcc, and even the content, you can use the form "mailto: [email protected][email protected]&[email protected]&subject='mailto 'Application skills pick up zero &body=mailto label comprehensive application example!" Such a statement, in this statement, the first function starts with "?", and each subsequent function starts with "&"; when you click this with the mouse When adding an email address, in the email editing window opened later, we will see that [email protected] is automatically filled in the recipient address column, and [email protected] is automatically filled in the CC address column. Automatically fill in [email protected] in the secret address column, and automatically fill in "'mailto' application skills pick up zero" in the subject column, and in the body part of the letter will automatically appear "An example of the comprehensive application of the mailto label! "Such a text. 

The [email protected], [email protected], and [email protected] that appear above are all for the convenience of explanation, and are set by the author at will. You can replace them with your real email address according to your own requirements; In addition, if you want to use mailto to implement multiple functions at the same time, the first function must start with "?", and each subsequent function must start with "&"; in addition, after cc is the CC address, and after bcc is the CC address Address, subject is the subject of the email, and body is the content of the email.

If you want to wrap lines in BODY, just add "%0d%0a" between lines.

<a href="mailto:[email protected]?subject=ccc&body=xxx%0d%0ayyy">aaa</a>

Article source: http://www.veryhuo.com/a/view/14698.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324928887&siteId=291194637