+ 3
Hello World! I have a question about making a custom tags PART 2...
So yeah, I have made so many custom tags but I just think that how to make a custom tags with a custom attribute, I searched but it says I got to use the "getAttribute" and the attribute "data-" with it for making a custom tags, I don't wanna use the attribute "data-" for making my custom attributes, and I just got to use the "getAttribute" in JS ( Extra: I don't know what is getAttribute in jQuery tho ), I'm planning to make a new tag and here's the example: ( I don't wanna give the tag name I wanna name 'cause you will already solve it, I wanna learn too ) <count until="500"></count> Just like the counter++ and counter += 1; ... It will keep counting until 500, is that possible?
4 Réponses
+ 4
https://code.sololearn.com/We41qo6xn6E6/?ref=app
+ 2
https://code.sololearn.com/WlDgdnv0q45n/?ref=app
in jqeury, getAttribute method is attr(), however I don't think you can use it in HTMLElement custom component.