2014-02-17 61 views

回答

3

jsFiddle Demo

你可以使用HTML元素

var CustomElement = function(){}; 
CustomElement.prototype = HTMLElement.prototype; 

的原型,現在你可以使用關鍵字new

var myElement = new CustomElement(); 
//myElement will now have access to the HTMLElement prototype 
構建它們