Through the implementation of the Web-based mailbox "Contact Us"

Source: Internet
Author: User

The latest project has a column to oversee the complaint. The initial design of this piece is similar to other sites, that is, through the "mailto: email address" to achieve this function. This enables the local client to respond.

But. Customers are not comfortable with this approach. In fact, we think about it too, for the average netizen, they use Outlook or Foxmail ratio is relatively low, most people use the web version of the mailbox.

So. This function of supervising complaints is set to jump mailbox login page relative more humanized.


Let's talk about how I came to this.


I set the page to a similar style:

Then enter the mailbox according to the user. Jump to the corresponding mailbox login page.

The principle is based on the e-mail address entered. Intercept the section behind the @ and then dynamically spell out the mailbox domain name.

Detailed code such as the following;

var i = 0;function copycontact () {//Right now this method is only applicable to IE, Cheetah and other browsers, want to be compatible with many other browsers, self-surfing data var contat = document.getElementById ("    Contact1 "). Value;    Window.clipboardData.setData (' text ', contat); if (Window.clipboardData.getData (' text ') = = ') {if (i = = 1) {Alert ("Replication failed, please copy manually.        "); } else {alert ("Replication failed. Please copy again!

"); i = 1; }} else {alert ("The content has been copied to the Clipboard!")

"); }}function Test () {var Uurl = $ ("#email"). Val (); Uurl = Gotoemail (Uurl); if (uurl! = ") {//$ (" #toopen "). attr (" href "," http://"+ Uurl); $ ("#toopen") [0].click (); window.open ("http://" + Uurl); } else {alert ("Sorry!" the corresponding mailbox login address was not found.) Please log in to your mailbox to view the mail!

"); }}//function: According to the user input email to jump to the corresponding email home function gotoemail ($mail) {$t = $mail. Split (' @ ') [1]; $t = $t. toLowerCase (); if ($t = = ' 163.com ') {return ' mail.163.com '; } else if ($t = = ' vip.163.com ') {return ' vip.163.com '; } else if ($t = = ' 126.com ') {return ' mail.126.com '; } else if ($t = = ' qq.com ' | | $t = = ' Vip.qq.com ' | | $t = = ' foxmail.com ') {return ' mail.qq.com '; } else if ($t = = ' gmail.com ') {return ' mail.google.com '; } else if ($t = = ' sohu.com ') {return ' mail.sohu.com '; } else if ($t = = ' tom.com ') {return ' mail.tom.com '; } else if ($t = = ' vip.sina.com ') {return ' vip.sina.com '; } else if ($t = = ' sina.com.cn ' | | $t = = ' Sina.com ') {return ' mail.sina.com.cn '; } else if ($t = = ' tom.com ') {return ' mail.tom.com '; } else if ($t = = ' yahoo.com.cn ' | | $t = = ' yahoo.cn ') {return ' mail.cn.yahoo.com '; } else if ($t = = ' tom.com ') {return ' mail.tom.com '; } else if ($t = = ' Yeah.net ') {return ' www.yeah.net '; } else if ($t = = ' 21cn.com ') {return ' mail.21cn.com '; } else if ($t = = ' hotmail.com ') {return ' www.hotmail.com '; } else if ($t = = ' sogou.com ') {return ' mail.sogou.com '; } else if ($t = = ' 188.com ') {return ' www.188.com '; } else if ($t = = ' 139.com ') {return ' mail.10086.cn '; } else if ($t = = ' 189.cn ') {return ' webmail15.189.cn/webmail '; } else if ($t = = ' wo.com.cn ') {return ' mail.wo.com.cn/smsmail '; } else if ($t = = ' 139.com ') {return ' mail.10086.cn '; } else {return '; }};

Now the only place to be good is when you jump to the mailbox login page of the response, you can't pass the mailbox that the user entered earlier. So that users need to enter more than once.

Do not know whether there is a better way to achieve, hope that everyone more generous enlighten!



Through the implementation of the Web-based mailbox "Contact Us"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.