What I would like to do is to add a link to each of the images generated on the keypress. For now it doesn't matter what the href is, I just want something like href="#" just to see it working - hopefully will be able to suss the rest out from there.
The code I'm using to generate the scrabble tiles as keys are pressed is this:-
var theLetter = document.getElementById("testtile");
var img = new Image();
//Don't run the rest of the code if non-alphabetical characters entered.
img.src = '/scrabbletiles/' + keynum + '.gif';
Is there an easy way of then doing something like img.href="#"? I've tried it that way but with no luck.
Any help would be appreciated.