This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title></title> | |
<script src="https://code.jquery.com/jquery.js" type="text/javascript"></script> | |
<script> | |
$(document).ready(function () { | |
$('#save').click(function () { | |
$('#loading').html('<img src="loading.gif">'); | |
//Start your business logic | |
//Below code is not correct, just want to wait my process inside this code, so that we can see loading image.. | |
for (var i = 0; i < 1000; i++) { | |
if (i == 1000) { | |
$('#loading').hide(); | |
$('#dvOutPut').html(i); | |
} | |
} | |
//End business logic | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<div id="loading"></div> | |
<div id="dvOutPut"></div> | |
<input id="save" value="Save" type="button" /> | |
</body> | |
</html> |