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 -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -