Website test code

by cjhaley

HTML

<script src="https://code.jquery.com/jquery-3.2.1.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://bootswatch.com/united/bootstrap.css">
<body>
<form class="form-horizontal">
      <fieldset>

      <!-- Form Name -->
      <h2>Login</h2>

      <!-- Text input-->
      <div class="form-group">
        <label class="col-md-4 control-label" for="emailInput">Email</label>  
        <div class="col-md-4">
        <input id="emailInput" name="emailInput" type="text" placeholder="Enter your Email adress" class="form-control input-md" required="">
        </div>
      </div>

      <!-- Password input-->
      <div class="form-group">
        <label class="col-md-4 control-label" for="passwordInput">Password</label>
        <div class="col-md-4">
        <input id="passwordInput" name="passwordInput" type="password" placeholder="Enter your Password" class="form-control input-md" required="">
        </div>
      </div>

      <!-- Button -->
      <div class="form-group">
        <label class="col-md-4 control-label" for="submitLogin">        </label>
        <div class="col-md-4">
          <button id="submitLogin" name="submitLogin" class="btn btn-primary">Login  <span class="glyphicon glyphicon-lock"></span>  </button>
        </div>
      </div>
  
    </fieldset>
    </form>
    <p id = "test1">Hello</p>
</body>

JavaScript

function userLogin() {
  var emailInput = document.getElementById("emailInput");
  var passInput = document.getElementById("passwordInput")
  
  if (emailInput = "cooper") {
  	if (passInput = "123") {
    document.getElementById("test1").innerHTML = "It works!!!";
    }
  }
  
  
}