Reputation: 139
I have a camera feature and the captured image will be displayed in this tag. I want to clear that image if I hit on reset button. I tried .empty() .clear() .reset. None of them works. How can I clear input type image?
<input type="image" id="myimage"/>
function resetimage(){
$('#myimage').empty();
}
Upvotes: 1
Views: 262
Reputation: 122008
There is no such thing like clear()
. What you can do is hide()
it. And whenever you want to show it back show()
it.
Alternatively you can try removing src attribute and setting src attr to ""
, but some browsers show the broken image which doen't look good.
Upvotes: 1