You can use javascript functions to check if an image is
loaded. Here we are discussion two methods.
1) Using onload function
<script>
// Check using onload function objImg = new Image(); objImg.src = 'photo.gif'; objImg.onload = function() { // do some work }2) Using Complete property
<script> // Check using complete property objImg.src = 'photo.gif'; objImg = new Image(); if(!objImg.complete) { // do some work }Hope this helps !</script>
No comments:
Post a Comment