This is the code I used to create the button:
var dfom = document.createElement('div');
dfom.setAttribute("id","options");
dfom.innerHTML = "<input type=\"button\" value=\"Say HI\" onclick=\get()\ />";
dfom.style.padding = '10px';
document.body.insertBefore(dfom, document.body.firstChild);
The button is created fine; it displays correctly. So to test it, I did this:
function get()
{
alert("HI");
}
However, when I click the button nothing happens. Any help, please? Thanks!