mercredi 28 octobre 2015

DOM manipulation even handlers

I want to add an Event handler to this button I created with an event handler. I don't know how to tell this button to go to a function MarkCell() when clicked though. I know that I will use the onClick Event but I don't know how to tell it what onClick event. I have to use DOM manipulation.

var right = document.createElement("Button");
var t = document.createTextNode("RIGHT");
right.appendChild(t);
document.body.appendChild(right);  




Aucun commentaire:

Enregistrer un commentaire