In the following example code, I attach an onclick event handler to the span containing the text \"foo\". The handler is an anonymous function that pops up an <
onclick
something.innerHTML += 'add whatever you want';
it worked for me. I added a button to an input text using this solution