I am trying to display image, through JavaScript, but i can't figure out how to do that. I have following
function image(a,b,c)
{
this.link=a;
this.alt=b;
this.thumb=c;
}
function show_image()
{
document.write("img src="+this.link+">");
}
image1=new image("img/img1.jpg","dsfdsfdsfds","thumb/img3");
in HTML
<p><input type="button" value="Vytvor" onclick="show_image()" > </p>
I can't figure out where should I put something like image1.show_image();
.
HTML? Or somewhere else...