Skip to content
Advertisement

How to create href link to function

I want to create link that send to function:

JavaScript

but the “id” parameter was not sent. How can I insert the parameter?

Advertisement

Answer

If id is already a defined variable then you can do like this:

JavaScript

You can do this if it is of type string.

Otherwise you can go for this:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement