ws2z3gr2017 7 years ago
parent
commit
2001ee7054
7 changed files with 28 additions and 50 deletions
  1. BIN
      img/check_lo.png
  2. BIN
      img/check_lono.png
  3. 3 1
      src/css/public.css
  4. 3 1
      src/css/register.css
  5. 5 26
      src/js/public.js
  6. 13 18
      src/js/register.js
  7. 4 4
      template/register.html

BIN
img/check_lo.png


BIN
img/check_lono.png


+ 3 - 1
src/css/public.css

@@ -15,7 +15,9 @@ a:hover{color:#000;text-decoration:none;}
 .lf{float:left;}
 .rf{float:right;}
 .clear{clear:both;}
-
+input:-webkit-autofill {
+    -webkit-box-shadow: 0 0 0px 1000px white inset !important;
+}
 input:focus{outline: none;}
 ul,ol{padding: 0;margin: 0;list-style: none;}
 

+ 3 - 1
src/css/register.css

@@ -108,6 +108,9 @@ margin:40px auto;padding: 20px 50px;overflow-y: auto;box-shadow: 0 10px 10px 0 #
 .login_uesr .log_del{width: 16px ;height: 16px;position: absolute; top: 10px;right: 10px;}
 .log_del:hover{cursor: pointer;}
 .login_uesr{margin-bottom: 20px;}
+.cheackeds{background:url(../../img/check_lo.png) no-repeat center left}
+.cheackeds_no{background:url(../../img/check_lono.png) no-repeat center left}
+
 
 .login_check u{float: right;line-height: 38px;}
 .login_check u a{color: #f18101;}
@@ -120,7 +123,6 @@ margin:40px auto;padding: 20px 50px;overflow-y: auto;box-shadow: 0 10px 10px 0 #
 .login_hua {position: absolute;top: 0;right: 0;}
 .login_close{position: absolute;top: 0;right: 0;width: 50px;height: 50px;z-index: 2000;}
 .login_close:hover{cursor: pointer;}
-
 .login_check label:first-child{margin-right: 15px;}
 .head_login:focus{text-decoration: none;}
 /*底部定制*/

+ 5 - 26
src/js/public.js

@@ -23,33 +23,12 @@ $(function(){
 	
 	var hht=$(window).height();	
 	$('.login').height(hht);
-	$('#Lo_user').focus(function(){
-		var use=$(this).val()
-		if(use=='用户名/邮箱/手机'){
-			$(this).val('').css({color:'#333333'})			
-		}
-		
-	})
-	$('#Lo_user').blur(function(){
-		var use=$(this).val();
-		if(use==''){
-			$(this).val('用户名/邮箱/手机').css({color:'#cccccc'})			
-		}		
+	$('#Lo_user').focus(function(){		
+		$(this).css({color:'#333333'})						
 	})
-	$('#Lo_pass').focus(function(){
-		var use=$(this).val()
-		if(use=='请输入密码'){	
-			$(this).attr('type',"password");
-			$(this).val('').css({color:'#333333'});			
-		}		
-	});
-	$('#Lo_pass').blur(function(){
-		var use=$(this).val();
-		if(use==''){
-			$(this).attr('type',"text");
-			$(this).val('请输入密码').css({color:'#cccccc'})			
-		}		
-	});
+	$('#Lo_pass').focus(function(){				
+			$(this).val('').css({color:'#333333'});					
+	});	
 	$('#checks').attr('checked',true)
 	$('#checks').click(function(){			
 		var Cheack=$(this).prop('checked')		

+ 13 - 18
src/js/register.js

@@ -2,7 +2,7 @@ import '../css/bootstrap.less';
 import 'bootstrap/dist/js/bootstrap.js';
 import '../css/public.css';
 import '../css/register.css';
-import './public.js'
+import './public.js';
 $(function(){
     //查看技淘网协议
     var hht=$(window).height();
@@ -34,7 +34,6 @@ $(function(){
             $(".businessName").css("display","block");
             $(".linkmanName").css("display","block");
             $(".zhuangjiaName").css("display","none");
-
         }
     });
     $("#zhuangjia").click(function(){
@@ -51,33 +50,29 @@ $(function(){
         $("#photo").css("color","#ccc");            
     });
     //修改单选框的样式
-    //$('.leibie input').css("display","none");
-    $("#qiye").prop('checked',true);
-    $(".qiye_lab").css({"background":"url(../img/check_lo.png) no-repeat center left","background-size":"13px 13px"});
-    $(".zhuangjia_lab").css({"background":"url(../img/check_lono.png) no-repeat center left","background-size":"13px 13px"});
-    $(".protocol_lab").css({"background":"url(../img/check_lono.png) no-repeat center left","background-size":"13px 13px"});
+    $("#qiye").prop('checked',true); 
     $('#qiye').click(function(){
         var Cheack=$(this).prop('checked')       
         if(Cheack){
-            $(this).parent().css({"background":"url(../img/check_lo.png) no-repeat center left","background-size":"13px 13px"})
+            $(this).parent().addClass('cheackeds').removeClass('cheackeds_no');
             $('#zhuangjia').prop('checked',false)
-            $('#zhuangjia').parent().css({"background":"url(../img/check_lono.png) no-repeat center left","background-size":"13px 13px"})
+            $('#zhuangjia').parent().addClass('cheackeds_no').removeClass('cheackeds');
         }else{
             $('#zhuangjia').prop('checked',true)
-            $('#zhuangjia').parent().css({"background":"url(../img/check_lo.png) no-repeat center left","background-size":"13px 13px"})
-            $(this).parent().css({"background":"url(../img/check_lono.png) no-repeat center left","background-size":"13px 13px"})
+            $('#zhuangjia').parent().addClass('cheackeds').removeClass('cheackeds_no');
+            $(this).parent().addClass('cheackeds_no').removeClass('cheackeds');
         }
     })
     $('#zhuangjia').click(function(){
         var Cheack_no=$(this).prop('checked')     
         if(Cheack_no){
-            $(this).parent().css({"background":"url(../img/check_lo.png) no-repeat center left","background-size":"13px 13px"})
+            $(this).parent().addClass('cheackeds').removeClass('cheackeds_no');
             $('#qiye').prop('checked',false)
-            $('#qiye').parent().css({"background":"url(../img/check_lono.png) no-repeat center left","background-size":"13px 13px"})
+            $('#qiye').parent().addClass('cheackeds_no').removeClass('cheackeds');
         }else{
             $('#qiye').prop('checked',true)
-            $('#qiye').parent().css({"background":"url(../img/check_lo.png) no-repeat center left","background-size":"13px 13px"})
-            $(this).parent().css({"background":"url(../img/check_lono.png) no-repeat center left","background-size":"13px 13px"})
+            $('#qiye').parent().addClass('cheackeds').removeClass('cheackeds_no');
+            $(this).parent().removeClass('cheackeds').addClass('cheackeds_no');
         }
     })     
     var xieyi=$('#protocol').prop("checked",false);
@@ -85,13 +80,13 @@ $(function(){
     $('.sub').css({background: '#CCCCCC',border: 'none'})
     $('#protocol').click(function(){
         var Cheack_no=$(this).prop('checked')        
-        if(Cheack_no){
-            $(this).parent().css({"background":"url(../img/check_lo.png) no-repeat center left","background-size":"13px 13px"})
+        if(Cheack_no){        	
+            $(this).parent().removeClass('cheackeds_no').addClass('cheackeds');
             $('.sub').attr('disabled', false);
             $('.sub').css({background: '#F18101',border: 'none'})    
         }else{
              $(this).prop('checked',false)	
-             $(this).parent().css({"background":"url(../img/check_lono.png) no-repeat center left","background-size":"13px 13px"})
+             $(this).parent().addClass('cheackeds_no').removeClass('cheackeds');
        		 $('.sub').attr('disabled', true)
    	         $('.sub').css({background: '#CCCCCC',border: 'none'}) 
         }       

+ 4 - 4
template/register.html

@@ -9,7 +9,7 @@
 	<meta name="viewport" content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1,user-scalable=no">
 	<meta http-equiv="x-ua-compatible" content="ie=edge">
     <title>注册</title>
-    <!--<link rel="stylesheet" href="../src/css/bootstrap.css" />
+   <!--<link rel="stylesheet" href="../src/css/bootstrap.css" />
     <link rel="stylesheet" href="../src/css/public.css" />   
 	<link rel="stylesheet" href="../src/css/register.css"/>-->
 </head>
@@ -71,11 +71,11 @@
 							<input type="button" id="photo" value="获取验证码" disabled/>
 						</div>
 						<div class="login_check">
-							<label for="qiye" class="qiye_lab">
+							<label for="qiye" class="qiye_lab cheackeds">
 							<input type="radio" name="leibie" id="qiye" value="1" checked/>
 							我是企业</label>
 
-							<label for="zhuangjia" class="zhuangjia_lab">
+							<label for="zhuangjia" class="zhuangjia_lab cheackeds_no">
 							<input type="radio" name="leibie" id="zhuangjia" value="0"/>
 							我是专家</label>
 						</div>
@@ -89,7 +89,7 @@
 							<input type="text" name="manName" placeholder="您的姓名" id="man"/>
 						</div>
 						<div class="protocol">
-							<label for="protocol" class="protocol_lab">
+							<label for="protocol" class="cheackeds_no">
 								<input type="checkbox" name="pro" id="protocol"/>
 								<a href="javascript:;" class="head_login_">同意技淘网会员服务协议条款</a>
 							</label>