I tried with old question, there they passing the value in js to js.But I would like to pass string from html to javascript. but it gives
Uncaught reference error
my html is
<a href="#" onclick="test(TEST123)">
and my javascript is,
function test(p){
alert(p)
}
how can I pass the string>
<a href="#" onclick="test('TEST123')">
just wite string parameter in your js function
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With