How do I change input widget’s text from another button's function?

@hou You can use storeValue function to assign a value to a variable on button click and then bind {{appsmith.store.variablename}} in the input widget. More on storeValue here - Store Value - Appsmith

Here’s an example app. You can fork it see it in the edit mode. Appsmith

Thanks, It works great!but I can only storeValue in Button func, is there a better place to initialize this Value?

You can write a JavaScript function to initialise this value and call this function on button click.

OK, I did the same, I just think there should be a unified initialization javascript function called when the page loads

@hou We are working on this feature. [Task]: On Page load setting for js editor functions · Issue #9130 · appsmithorg/appsmith · GitHub