Home > Software design >  how to add text and img in value button with jquery
how to add text and img in value button with jquery

Time:03-23

I´m traying to create a dynamic button with jquery and API Redsys. But i want to change value for default to this button and i´m traying to do this:

$("#btn_submit").val('Pasarela de pago TPV - ' "<img src='{{ asset('media/santander.png') }}' name='logo' /> ");

and result it´s:

result

i want show this img in my button.

Anybody can help me?

Thanks

CodePudding user response:

You could like this:


e = "<img src='{{ asset('media/santander.png') }}' name='logo' />";
$("#btn_submit").html(`Pasarela de pago TPV - ${e}`);

  • Related