The first step: Make a login form and send the required data to the JavaScript function.
<form name=″mailform″action=″javascript:go () ″onsubmit=″return check (this) ″method=″post″>
Step Two: Place the following code between
<script language=″javascript″><!--
function Makeurl () {var objform=document.mailform;
var Intindex=objform.mailselect.options.selectedindex;
var Varinfo=objform.mailselect.options[intindex].value;
var arrayinfo=varinfo.split (′;′);
var Strname=objform.name.value,varpasswd=objform.password.value;
var strprovider=arrayinfo[0],stridname=arrayinfo[1],varpassname=arrayinfo[2];
var strurl=′http://′+strprovider+′?′+stridname+′=′+strname+′&′+varpassname+′=′+varpasswd;
return strurl;
}
function Go () {
var strlocation=makeurl ();
window.open (strlocation,′′,′′);
}
function check (input) {
if (input.mailselect.options.selectedindex==0) {
Alert (″ Please select your email address!) ″);
return false;}
if (Input.name.value==″″) {
Alert (″ you forgot to fill in your account name!) ″);
Input.name.focus ();
return false;}
if (input.password.value==″″| | input.password.value.length<3) {
Alert (″ your password is less than 3 characters long?) Just fill it out again! ″);
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.