Quote:
Originally Posted by javasnip
My knowledge is limited.. and that is how it was being explained and I personally thought it was me lacking and being confused.. but it seems his way is very awkward.. He was saying that if you named the images that way like 1-J etc. it would show the images instead of the text. But obviously not. does this bit a code from above make sense
Code:
cardname1=rands1+"-"+randn1+".jpg";
|
Yes, but *ONLY* if you then did something like
Code:
document.getElementById("card1").src = cardname1;
where you ALREADY have, on your page, something like
You *could*, instead, do something like
Code:
<div id="card1"></div>
...
document.getElementById("card1").innerHTML = '<img src="' + cardname1 + '" alt="random card" />';
but that's not recommended coding.