How to show pop up text onClick | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

How to show pop up text onClick

I would like to show some text when someone clicks a particular text. Sort of an alert and the user just has to click ok after reading the text. The text is a whole block element <div> containing about 5 paragraphs and is found in the html section of the document.

23rd Aug 2021, 3:40 AM
Austin Nzioka
Austin Nzioka - avatar
1 ответ
+ 3
<span onclick="alert(this.textContent)">some text</span>
23rd Aug 2021, 3:57 AM
SAN
SAN - avatar