Reputation: 820
I have an echo in my php page which has a javascript in it.
it looks like this:
echo '<ons-list-item onclick="fn.load('home.html')" tappable>';
I need to escape the single quotes on fn.load('home.html')
so i did:
echo '<ons-list-item onclick="fn.load(/'home.html'/)" tappable>';
But that doesn't really work..
could someone please advise on this?
Thanks in advance.
Upvotes: 0
Views: 36
Reputation: 2102
Try using double quotes around "home.html".
Or you need to escape ", so it won't be interpreted as end of string. Use \ to escape the quotes as you said.
Upvotes: 2