How to change <ons-button> text?



  • Hello,

    How to change button text from “ADD” to “View” below please?

    <ons-button id=“btn1” class=“button button–cta-large” style=“align:right; margin: 0 auto;” onclick=“test()”> Add </ons-button>

    Thanks for your help!



  • @mmike ,

    document.getElementById("btn1").innerText = " View ";
    


  • Thanks Jamal!


Log in to reply