how to set on button click load more in html with setAttribute code example Example: set attribute javascript Element.setAttribute(name, value);