亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

登錄框彈不出來,求解!

登錄框彈不出來,求解!

lorelei 2015-11-19 23:40:57
<div class="login"> <a href="" class="a1">登錄</a><a href="" class="a2">注冊</a> </div><div id="LoginBox">? ? ? ? <div class="row1">? ? ? ? ? ? 登錄<a href="javascript:void(0)" title="關閉窗口" class="close_btn" id="closeBtn">×</a>? ? ? ? </div>? ? ? ? <div class="row">? ? ? ? ? ? 用戶名: <span class="inputBox">? ? ? ? ? ? ? ? <input type="text" id="txtName" placeholder="請輸入手機號或郵箱登錄" />? ? ? ? ? ? </span><a href="javascript:void(0)" title="提示" class="warning" id="warn">*</a>? ? ? ? </div>? ? ? ? <div class="row">? ? ? ? ? ? 密&nbsp;碼: <span class="inputBox">? ? ? ? ? ? ? ? <input type="text" id="txtPwd" placeholder="請輸入密碼" />? ? ? ? ? ? </span><a href="javascript:void(0)" title="提示" class="warning" id="warn2">*</a>? ? ? ? </div>? ? ? ? <div class="row">? ? ? ? ? ? <input type="submit" id="loginbtn" value="登錄">? ? ? ? </div>? ? </div><script type="text/javascript"> $(function ($) { //彈出登錄 $("#a1").hover(function () { $(this).stop().animate({ opacity: '1' }, 600); }, function () { $(this).stop().animate({ opacity: '0.6' }, 1000); }).on('click', function () { $("body").append("<div id='mask'></div>"); $("#mask").addClass("mask").fadeIn("slow"); $("#LoginBox").fadeIn("slow"); }); // //按鈕的透明度 $("#loginbtn").hover(function () { $(this).stop().animate({ opacity: '1' }, 600); }, function () { $(this).stop().animate({ opacity: '0.8' }, 1000); }); //文本框不允許為空---按鈕觸發 $("#loginbtn").on('click', function () { var txtName = $("#txtName").val(); var txtPwd = $("#txtPwd").val(); if (txtName == "" || txtName == undefined || txtName == null) { if (txtPwd == "" || txtPwd == undefined || txtPwd == null) { $(".warning").css({ display: 'block' }); } else { $("#warn").css({ display: 'block' }); $("#warn2").css({ display: 'none' }); } } else { if (txtPwd == "" || txtPwd == undefined || txtPwd == null) { $("#warn").css({ display: 'none' }); $(".warn2").css({ display: 'block' }); } else { $(".warning").css({ display: 'none' }); } } }); //文本框不允許為空---單個文本觸發 $("#txtName").on('blur', function () { var txtName = $("#txtName").val(); if (txtName == "" || txtName == undefined || txtName == null) { $("#warn").css({ display: 'block' }); } else { $("#warn").css({ display: 'none' }); } }); $("#txtName").on('focus', function () { $("#warn").css({ display: 'none' }); }); // $("#txtPwd").on('blur', function () { var txtName = $("#txtPwd").val(); if (txtName == "" || txtName == undefined || txtName == null) { $("#warn2").css({ display: 'block' }); } else { $("#warn2").css({ display: 'none' }); } }); $("#txtPwd").on('focus', function () { $("#warn2").css({ display: 'none' }); }); //關閉 $(".close_btn").hover(function () { $(this).css({ color: 'black' }) }, function () { $(this).css({ color: '#999' }) }).on('click', function () { $("#LoginBox").fadeOut("fast"); $("#mask").css({ display: 'none' }); }); }); </script> ? ? ? ?
查看完整描述

1 回答

?
pardon110

TA貢獻1038條經驗 獲得超227個贊

將你整個代碼貼出來,方便大家測試找出問題。

查看完整回答
反對 回復 2015-11-21
  • 1 回答
  • 0 關注
  • 1702 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號