小编Moe*_*e C的帖子

Using html tags vs javascript create element

I'm trying to get a grasp on html and javascript and wondering if there is a functional difference between using document.createElement(some_tag) vs <some tag></some tag>. I can see how using javascript's create element might make it easy to create the specific element over and over in different pages/sections of the website (instead of copying and pasting and making your code bulky). But is it bad practice/bad for memory or something to use create element.

For instance, consider the following …

html javascript

5
推荐指数
0
解决办法
890
查看次数

标签 统计

html ×1

javascript ×1