ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

Muhammad Waqas
من قبل Muhammad Waqas , Dot Net and MVC Developer , Osys Technologies

Custom elements are created using document.registerElement():

Example:

var myFoo=document.registerElement('my-Foo')

document.body.appendChild(new myFoo());

 

The first argument to document.registerElement() is the element's tag name. The name must contain a dash (-). So for example, <x-tags><my-element>, and <my-awesome-app> are all valid names, while <tabs> and <foo_bar> are not. This restriction allows the parser to distinguish custom elements from regular elements but also ensures forward compatibility when new tags are added to HTML.

 

Mahmoud Elmahdi
من قبل Mahmoud Elmahdi , UX/UI Designer, Web Developer , ikantam.com

If you're looking to create your own tag, then there's several ways to do it!* Polymer by Google https://www.polymer-project.org/

* Pure js as ( as showing in the prev answer )

* Angularjs 

Pugazhenthi Chandraboss
من قبل Pugazhenthi Chandraboss , Marketing Manager , Pugazh TV

<HTML>

</HTML>

 

must be include slash tag before save the page like </html>

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟