If WeChat Mini Programs presses the BUTTON button to display a string of numbers in another INPUT box, how to write the code?

WeChat Mini Programs has two INPUT and a BUTTON
user enters a string of numbers in the first INPUT, and pressing BUTTON, will display the result of adding 123 to the value in the first BUTTON in the second INPUT.
ask how the code is written.

Mar.15,2022

bind the bindtap event to the button, trigger the event setData the number you want to change, and then bind this variable to the value of input

<button bindtap="setNumber"></button>
<input value="{{number}}" />

data: {
    number: ''
}
setNumber: function() {
    this.setData({
        number: '123456789'
    })
}
Menu