Why it doesn't work | Sololearn: Learn to code for FREE!

+7

Why it doesn't work

I created a button to copy a specific text on click but it doesn't work. https://code.sololearn.com/Wzr3V3zyf4rC/?ref=app

3 Answers

New Answer

+9

β„‚π•™π•šπ•˜π• π•«π•šπ•– π”Έπ•Ÿπ•ͺπ•’π•–π•›π•šπŸ‡³πŸ‡¬ You are not adding textarea element in body do this: document.body.appendChild(code); https://code.sololearn.com/Wgsvi8PzBDjq/?ref=app

+5

Thanks Sir it works now

+1