javascript quotes within quotes

This is probably a rather simple question, but web searching has turned up the wrong answers. I have the following line in an html file:

onmouseover="'pointer';\"url ('images/E-hover.png')\";"

It doesn't work with quotes escaped as shown. How do I make this work?
Who is Participating?
RobOwner (Aidellio)Commented:
Or keep your quoting style the same (single inside, double outside):,output

Tom BeckCommented:
Try this. The background image url should work without quotes.

onmouseover="'pointer';'url (images/E-hover.png)';"
jmarkfoleyAuthor Commented:
Both of those ideas worked! Good to know both. Rob Jurd's will work if I have a URL with embedded spaces.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.