Best control with image and onClick to call javascript function
What is the best control which can display image, call javascript and do it without postba开发者_运维知识库ck? maybe even change an image on hover?
You're looking for the <img>
tag.
A HTML Element of your choice I suppose:
<div style="background: pink url(/image.png);" onclick="alert('javascript')">
</div>
CSS:
div:hover {
background: lightgreen url(/image2.png);
}
精彩评论