Anyone please help me with JavaScript mouse pointer on divs | Sololearn: Learn to code for FREE!

0

Anyone please help me with JavaScript mouse pointer on divs

2/16/2021 1:33:46 AM

ian

8 Answers

New Answer

+4

ian Because you have used double quotes inside double quotes. Try this <div onclick="alert ('hi')">click on pointer</div>

+3

https://www.sololearn.com/discuss/333866/?ref=app

+2

+1

please post your entire code

0

<div ____="alert ("hi")">click on pointer</div>

0

It doesn't work

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.

0

Ok