模态弹出不使用Bootstrap

时间:2017-02-28 07:47:27

标签: javascript jquery twitter-bootstrap

我正在创建登录页面和注册也使用忘记密码。如果用户单击忘记密码新弹出将打开我正在使用Bootstrap。我累了当点击忘记密码现在没有打开弹出。我也尝试使用不同的方法。



<head>
	<meta charset="utf-8">
	<title>Daily UI - Day 1 Sign In</title>

	<!-- Google Fonts -->
	<link href='https://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700|Lato:400,100,300,700,900' rel='stylesheet' type='text/css'>

	<link rel="stylesheet" href="css/animate.css">
	<!-- Custom Stylesheet -->

	    <link rel="shortcut icon" href="../favicon.ico"> 
        <link rel="stylesheet" type="text/css" href="css/demo.css" />
        <link rel="stylesheet" type="text/css" href="css/style1.css" />
		<link rel="stylesheet" type="text/css" href="css/style.css" />
		<link rel="stylesheet" type="text/css" href="css/animate-custom.css" />
		<link rel="stylesheet" type="text/css" href="css/Modal.css"/>

		
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/>

    	<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
	
</head>

<body style="overflow:hidden;">
	<div class="container">
       
            <header>		
            </header>
            <section>				
                <div id="container_demo">
                   
                    <a class="hiddenanchor" id="toregister"></a>
                    <a class="hiddenanchor" id="tologin"></a>
                    <div id="wrapper">
                        <div id="login" class="animate form">
                          
                                <h1>Log in</h1> 
                                <p> 
                                    <label for="username" class="uname" data-icon="u" > Your email or username </label>
                                    <input id="username" name="username" required="required" type="text" placeholder="myusername or mymail@mail.com"/>
                                </p>
                                <p> 
                                    <label for="password" class="youpasswd" data-icon="p"> Your password </label>
                                    <input id="password" name="password" required="required" type="password" placeholder="eg. X8df!90EO" /> 
                                </p>
                                <p class="keeplogin"> 
									<input type="checkbox" name="loginkeeping" id="loginkeeping" value="loginkeeping" /> 
									<label for="loginkeeping">Keep me logged in</label>
								</p>
                                <p class="login button"> 
                                    <input type="submit" id="myBtn" value="Login In" /> 
								        <!-- The Modal -->

								</p>	
                         
                              
                            
                               <p class="change_link">
								 <a href="#" class="list-group-item" data-toggle="modal" data-target="#myModal">Forgot my password</a>
                            	   
									<a href="#toregister" class="to_register">Join us</a>
								</p>
                           
                               </div>	
							   
							   
							   
							   <div id="myModal" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
  <div class="modal-dialog modal-sm">
    <div class="modal-content">
      <p>modal popup</p>
    </div>
  </div>
</div>
							   
							   
						
                        <div id="register" class="animate form">
                             
                                <h1> Sign up </h1> 
                                <p> 
                                    <label for="usernamesignup" class="uname" data-icon="u">Your username</label>
                                    <input id="usernamesignup" name="usernamesignup" required="required" type="text" placeholder="mysuperusername690" />
                                </p>
                                <p> 
                                    <label for="emailsignup" class="youmail" data-icon="e" > Your email</label>
                                    <input id="emailsignup" name="emailsignup" required="required" type="email" placeholder="mysupermail@mail.com"/> 
                                </p>
                                <p> 
                                    <label for="passwordsignup" class="youpasswd" data-icon="p">Your password </label>
                                    <input id="passwordsignup" name="passwordsignup" required="required" type="password" placeholder="eg. X8df!90EO"/>
                                </p>
                                <p> 
                                    <label for="passwordsignup_confirm" class="youpasswd" data-icon="p">Please confirm your password </label>
                                    <input id="passwordsignup_confirm" name="passwordsignup_confirm" required="required" type="password" placeholder="eg. X8df!90EO"/>
                                </p>
                                <p class="signin button"> 
									<input type="submit" value="Sign up"/> 
								</p>
							
                                <p class="change_link"> 
							        
									
									<a href="#tologin" class="to_register"> Go and log in </a>
								</p>
                           
                        </div>
						
                    </div>			
                </div>  
</body>
&#13;
&#13;
&#13;

单击忘记密码无显示。请帮我 ?在哪里我犯了错误如何解决这个问题?

2 个答案:

答案 0 :(得分:2)

您需要将jQuery脚本放在Bootstrap之上

答案 1 :(得分:1)

在bootstrap之前添加jQuery库

project1

注意: -

Yout HTML代码看起来非常混乱(多个未关闭的元素以及错位的元素,请更正它们)