Can I use onclick event inside image tag? -


i trying call function way. onclick not working. <img id="myimg" src="uploads/15051139151863de8020740a7899d26ead30d24770.jpg" onclick="modalview()" width="300" height="200">

correct syntax:

<img src="http://example.com" onclick="function()"> 

or can use extern call this:

$("img").click(function() {   alert("image clicked"); }); 

Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -