title: Javascript how to show image warning validation instead of alert message
body: <p>,Hi all,</p>
  
  <p>I can show alert message if username Textbox is empty or password textbox is empty with below code.</p>
  
  <p>I want to show <strong>image warning</strong> instead of showing <strong>alert message</strong></p>
  
  <p>How can ı make it in below code ?</p>
  
  <pre><code> &lt;input type="text" id="UsernameTextBox" name="UsernameTextBox"/&gt;
   &lt;input type="text" id="PasswordTextBox" name="PasswordTextBox"/&gt;
   &lt;input type="button" onclick="LoginButonOnclick()" value="Enter"/&gt;
  
  function LoginButonOnclick() {
  var data= {
  Username: $('#UsernameTextBox').val(),
  Password: $('#PasswordTextBox').val(),
  };
  
  
          if (data.Username==null) {
          alert(UserName Can Not Be Empty!"); // I want to show image warning
          }
          if (data.Password==null) {
          alert("Password Can Not Be Empty!"); // I want to show image warning
          }
  
  
  
   if (data.Username&amp;&amp; data.Password) {
   $.ajax({
   url: "/Home/Menu",
   type: "POST",
   dataType: "json",
   contentType: 'application/json',
  
   data: JSON.stringify(data),
   success: function (mydata) {
   if (mydata.error == true) {
   // İnvalid
   }
   else {
   // Success
   }
   },
   error: function () {
   $("#message").html("Error ");
   }
   });
   return false;
   }
   }
  </code></pre>