How do I pass parameter by onclick?

Asked

Viewed 60 times

-8

How do I pass this parameter that is within the row by parameter in onclick?

código

  • 8

    http://idownvotedbecau.se/imageofcode

  • Young man, please post your code with text and not as images.

  • Read this: https://pt.meta.stackoverflow.com/a/5485/132

1 answer

0


Try wearing something like that:

editBtn = '<a type="button" onclick="javascript:Devolver('
        + "'XXX'"
        + ')"><span class="btn btn-danger">Devolver</span></a>';
editBtn = editBtn.replace('XXX', row.PlacaDoVeiculo);
return editBtn;

Notice that you had also forgotten the > before the <span which closes the label of <a.

And next time, please put the code as text in your question. Everyone on this site hates to see code within images.

  • Vlw Victor, thank you so much for answering, next time I no longer use images, I saw that many disapproved my question, Thanks for the tip, vlw !

  • @Fullstackoverflow If this answer solved your problem and there is no doubt left, mark it as correct/accepted by clicking on the " " that is next to it, which also marks your question as solved. If you still have any questions or would like further clarification, feel free to comment. :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.