Anyone please help me with JavaScript mouse pointer on divs | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Anyone please help me with JavaScript mouse pointer on divs

16th Feb 2021, 1:33 AM
ian
ian - avatar
8 Respostas
+ 4
ian Because you have used double quotes inside double quotes. Try this <div onclick="alert ('hi')">click on pointer</div>
16th Feb 2021, 1:18 PM
AĶ¢J
AĶ¢J - avatar
+ 2
ian onclick
16th Feb 2021, 2:19 AM
AĶ¢J
AĶ¢J - avatar
+ 1
please post your entire code
16th Feb 2021, 1:54 AM
Wilbur Jaywright
Wilbur Jaywright - avatar
0
<div ____="alert ("hi")">click on pointer</div>
16th Feb 2021, 2:07 AM
ian
ian - avatar
0
It doesn't work
16th Feb 2021, 8:36 AM
ian
ian - avatar
0
ļæ¼ I think I understand the code you wrote. Youā€™re making a quotations mistake. You need to change either the inner or outer quotes to single quotes, or use escape sequences, so the interpreter will recognize that itā€™s not the end of the quote but rather a further inner quote.
16th Feb 2021, 1:03 PM
Wilbur Jaywright
Wilbur Jaywright - avatar
0
Ok
16th Feb 2021, 4:54 PM
ian
ian - avatar