Printing a JS variable in a value=“” attribute

前端 未结 3 830
自闭症患者
自闭症患者 2021-01-27 11:45

I\'m trying to implement a Paypal button with a dynamic value. When I enter, for example, value=\"300.00\", the button works fine.

However, if I do it my way, the button

3条回答
  •  感情败类
    2021-01-27 12:10

    It doesn't work because you have unclosed tags.
    Notice here that you opened another tag without closing the other tag.

    <*input type="hidden" name="amount" value="<*script

    To achieve what you want, you need to write the entire block using JS

    
    

提交回复
热议问题