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 -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -