ifdyourgoats
ifdyourgoats

Reputation: 11

Mutiple quotation marks in HTML / Javascript

Sorry for the stupid question. I tried looking for an answer somewhere, but couldn't find any. I can't get this code to work:

<div onmouseover="this.style.backgroundImage = 'url('#')'";>
</div>

Help?

Upvotes: 0

Views: 50

Answers (1)

artin
artin

Reputation: 1834

Escape single quotes:

<div onmouseover="this.style.backgroundImage = 'url(\'#\')'">
</div>

Upvotes: 3

Related Questions