Well... I don't know JS that well, but I suppose you could just do this...
Code:
var newdiv;
newdiv = '<div>' + divcontent + '</div>';
var divcontent;
divcontent = '<input type="button" onClick="this.innerText = this.innerText + divcontent2">';
Seems like it could work out alright. Untested. Also... serves no real purpose. ...just makes a ton of divs.
EDIT: Well... since I don't know JS that well, I can't finish the code. I was testing it an realized I just messed up putting 'this' which would refer to the button, not the div. So.... this.parentdiv would be great, but I don't know what the right code is to select that. Perhaps someone else can suggest something.
Bookmarks