Verify when the form check hits the login button

Source: Internet
Author: User
<title> Leisure NET Login page </title> <script type= "Text/javascript" src= "Js/jquery-1.11.1.js" ></script>
	<style type= "Text/css" > * {padding:0;
margin:0;
	} body {font-size:12px;
	Color: #000;
line-height:25px;
	}. main {float:none;
	margin-top:0px;
	Margin-right:auto;
	margin-bottom:0px;
	Margin-left:auto;
Clear:both;
	} #header {Background-image:url (./images/bg.gif);
	Background-repeat:repeat-x;
height:36px;
	} #headerLeft {width:200px;
Float:left;
	} #headerRight {width:160px;
	Float:right;
Color: #FFF;
	} #center {width:362px;
	Text-align:center;
	margin-top:20px;
	Margin-right:auto;
	margin-bottom:20px;
Margin-left:auto;
	}. bg {background-image:url (picture/dl_l_bg.gif);
Background-repeat:repeat-y;
	}. inputs {width:110px;
	height:16px;
Border:solid 1px #666666;
	}. Bold {font-size:18px;
	Font-weight:bold;
	Text-align:center;
	line-height:45px;
height:40px;
	}. Rb1 {height:20x;
	Color: #fff; Font-size:13px;
	Background: #d32c47;
	PADDING:3PX 10px;
	border-left:1px solid #fff;
	border-top:1px solid #fff;
	border-right:1px solid #6a6a6a;
	border-bottom:1px solid #6a6a6a;
Cursor:pointer;
	} #footer {text-align:center;
	Color: #333;
line-height:35px;
	} #footer A {color: #333;
Text-decoration:underline;
	} #footer Hover {color: #333;
Text-decoration:none; } </style>

<script type= "Text/javascript" >
        //First step; When I click the login button, submit the form, that is, the value of the label with the name attribute in the form is submitted to the form
		function Checkemail () {
		
	      var flag=true;
		  1. Lock
             the object var dom=$ ("[Id=email]");//yymqqc@126.com
             
          //2. Decide whether to include @ and.
            var value=dom.val ();
            if (Value.indexof ("@") ==-1) {
               alert (' must contain @ ' in the mailbox);
               Flag=false;
            }
            
             if (Value.indexof (".") ==-1) {
               alert (' mailbox must contain. ');
               Flag=false;
             }
          return flag;   
		}
        
       $ (function () {
			var myform=$ ("form");
		 	Myform.submit (function () {
			   return checkemail ();				   
			});
       }); 
        
    </script>

</script>

<body> <div id= "header" class= "main" > <div id= "headerleft" >  < /div> <div id= "headerright" > Registration | Login | Help </div> </div> <div class= "main" > <table id= "center" border= "0" cellspacing= "0" cellpadding= "0" &
			Gt <tr> <td></td> </tr> <tr> <td class= "BG" &G
					T <table width= "100%" border= "0" cellspacing= "0" cellpadding= "0" > <tr> <td class= "bold" > Login Leisure Network
							</td> </tr> <form action= "day08shangke2.html" method= "post" id= "MyForm" name= "MyForm" > <tr> <td>email:<input id= "Email" type= "text" name= "email" class= "inputs"/></td&gt
							; </tr> <tr> <td>  Password: <input id= "pwd" type= "password" name= "pwd" class= "INP UTS "/></td> </tr> <tr> &LT;TD Style= "HEIGHT:35PX; padding-left:30px; " ><input id= "BTN" type= "submit" value= "Login" class= "Rb1"/></td> </tr> &LT;/FORM&G
					T </table> </td> </tr> <tr> <td></td> </tr> </table> </div> <div id= "Footer" class= "main" > <a href= " # > About Us </a> | <a href= "#" > Careers </a> |<a href= "#" > Contact </a> | <a href= "#" > Help Center </a> </div> </body>

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.