I am creating a CPF generator, which when the person generates, a "Copy" option appears, but I would like to know how to implement the copying of the content that is displayed.
ExampleHTMLCode:
<spanid="numerosx">56262662</span>
<button id="btcopiar">COPIAR</button>
Note: Pure Javascript.