Reputation: 2422
I have a javascript onclick
function. I am passing certain values which has special characters inside onclick
.
<a href="#" onclick="editLocation(34:B1:F7:D5:BB:52)">click</a>
which gives me an error
How do i pass all the value inside onclick
.. I don't want to ignore special character. I must pass the complete value 34:B1:F7:D5:BB:52
Upvotes: 1
Views: 1074
Reputation: 77482
Add single quotes, like this
<a href="#" onclick="editLocation('34:B1:F7:D5:BB:52')">click</a>
Upvotes: 2