javascript - Why can't I bind events to the elements in a namespace? -


i have following code , want listen mouseclick event nothing happen in case why?

function obj(tag){   this.el = document.createelementns("http://www.w3.org/1998/math/mathml",tag);   this.el.appendchild(document.createtextnode("cccc"));   this.el.onclick = function(){     alert("onclick");   } } var x = new obj("mi"); document.body.appendchild(x.el); 


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -