Articles tagged "html"
1 min readBeginner
How to Change a DOM element's class with JavaScript
If you want to change element class using javascript you can try: document.getElementById("ElementId").classList.add('NewClass') to add a new class. Alternative methods are remove and contains. Check here for more examples and alternatives using jQuery or coe for older browsers.
2 min readBeginner
JavaScript Links: # vs javascript:void(0)
In this article we explain the differences of using "#" or "javascript:void(0)" in the href attribute. We warn you that for modern javascript you should avoid using this values in the href since it's a bad practice.
1 min readBeginner
How to Redirect using HTML
To redriect using HTML add a meta with the desired url. Check here for more details
2 min readBeginner
How to create an HTML button that acts like a link?
When using only HTML, you have to use `