A recent project has a monitoring complaint column, the initial design and other sites similar to the "mailto: email address" to achieve this function. This enables the local client to respond.
However, the customer is not satisfied with this method. In fact, we think about it also, for ordinary users, they use Outlook or Foxmail ratio is relatively low, most people use the web version of the mailbox. Therefore, the supervision of complaints of this function set to jump Mailbox login page is relatively more humane.
Let's talk about how I realized it.
I set the page to a similar style:
Then, according to the user enters the mailbox, jumps to the corresponding mailbox sign-in page.
The principle is to intercept the part after the @ based on the e-mail address entered, and then dynamically spell out the mailbox domain name.
The specific code is as follows;
var i = 0;function copycontact () {//Currently this method only applies to IE, cheetah and other browsers, want to be compatible with other more browsers, self-surfing the data var contat = document.getElementById ("Con Tact1 "). Value; Window.clipboardData.setData (' text ', contat); if (Window.clipboardData.getData (' text ') = = ') {if (i = = 1) {alert ("Copy 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!" not found the corresponding email login address, please log in to the 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 perfected is when you jump to the mailbox login page of the response, you cannot pass the mailbox that the user entered before, so that the user needs to enter more than once.
Do not know whether there is a better way to achieve, look at you more advice!
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Through the implementation of the Web-based mailbox "Contact Us"