title: Check if input value has a "." (dot) (Javascript)
body: <p>Okay, so I'm working on this contact form <a href="http://www.matthekosloski.me/contact" rel="nofollow">here</a>, and everything seems to be working well.  It checks if the email address has an "@" sign with the following code: (It's a function, just not shown here for ease).</p>
  
  <p><strong>JS:</strong></p>
  
  <pre><code>var at = "@";
  
  if (email.indexOf(at) == -1 || email.indexOf(at) == 0) {
     success = false;
     document.getElementById("email-error").innerHTML = "That's not an email!";
     document.getElementById("email-good").innerHTML = "";
   }
  </code></pre>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;input onfocus="return validation()" type="text" name="email" id="email"&gt;&lt;span id="email-error"&gt;&lt;/span&gt;&lt;span id="email-good"&gt;&lt;/span&gt;
  </code></pre>
  
  <p><strong>I want to check if there is a "." (dot) in the email value with the following code, but it doesn't work!</strong></p>
  
  <pre><code>  var at = "@";
    var dot = ".";
  if (email.indexOf(at) == -1 || email.indexOf(at) == 0 || email.indexOf(dot) == -1 ||    email.indexOf(dot) == 0) {
  success = false;
  document.getElementById("email-error").innerHTML = "That's not an email!";
  document.getElementById("email-good").innerHTML = "";
  }
  </code></pre>
  
  <p>Also, if possible, is there a way to check if there are more than one "@" or "." ?  I tried > and != 1 already.</p>