Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function LoginButonOnclick() {
- var data= {
- UserName: $('#UserNameTextBox').val(),
- Password: $('#PasswordTextBox').val(),
- };
- if (data.UserName== null) {
- $("#showwarning1").html('<img src="~/Image/warning.png">');
- }
- if (data.Password== null) {
- $("#showwarning2").html('<img src="~/Image/warning.png" />');
- }
- }
- <input type="text" id="UsernameTextBox" name="UsernameTextBox"/>
- <input type="text" id="PasswordTextBox" name="PasswordTextBox"/>
- <input type="button" onclick="LoginButonOnclick()" value="Enter"/>
- <div id="showwarning1"></div>
- <div id="showwarning2"></div>
- <img src="~/Image/warning.png" title="Password is empty!!"/>
- function LoginButonOnclick() {
- var data= {
- UserName: $('#UserNameTextBox').val(),
- Password: $('#PasswordTextBox').val(),
- };
- if (data.UserName== null) {
- $("#showwarning1").html('<img src="~/Image/warning.png">');
- }
- if (data.Password== null) {
- $("#showwarning2").html('<img src="~/Image/warning.png" />');
- }
- }
- <input type="text" id="UsernameTextBox" name="UsernameTextBox"/>
- <input type="text" id="PasswordTextBox" name="PasswordTextBox"/>
- <input type="button" onclick="LoginButonOnclick()" onmouseover="LoginButonOnclick()" value="Enter"/>
- <div id="showwarning1"></div>
- <div id="showwarning2"></div>
- $(function(){
- $("#showwarning1").on('mouseover', function(){
- //show error message to the user
- console.log("UserName Can Not Be Empty!");
- });
- $("#showwarning2").on('mouseover', function(){
- //show error message to the user
- console.log("Password Can Not Be Empty!");
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement