Javascript Code
function load()
{
var s = window.location.href;
var temp_img_url=s.split("?");
var img_url=temp_img_url[1];
}
html code
<img id="bigpic" src=" " style="display: none; ">
I am trying to put img_url in src.
What is the way to do that.
Thank you.
add this line at the end of your load() function:
this is from memory (my js is a little rusty) but should do the trick.
It uses the
getElementById()method to get the element with the ID ofbigpic(your image element) and sets thesrcattribute to the value of yourimg_urlvariable.