hey, how can I make an image visible when a user clicks a button? Using Html / Javascript
Also, the button is submitting a form which is going to a different url, it just takes a while to load the other page, therfore I want a开发者_如何学Python loading type button.
Thanks
It's simple to acheive this across all modern browsers using jQuery:
<input type="submit" value="Show Image" id="showButton" />
<img src="blank.gif" id="blankImage" alt="blank" style="display: none;" />
<script type="text/javascript">
$('#showButton').click( function() {
$('#blankImage').show();
return false;
});
</script>
set the image's visible property to true?
精彩评论