0

Anyone please help me with JavaScript mouse pointer on divs

16th Feb 2021, 1:33 AM
ian
ian - avatar
8 Answers
+ 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