【发布时间】:2018-07-18 16:47:17
【问题描述】:
我有一个输入和一个按钮,我需要在按下按钮时保存文本输入的值。
dcc.Input(id='username', value='Initial Value', type='text'),
html.Button(id='submit-button', children='Submit'),
我的回调中遗漏了什么?
@app.callback(Output('output_div','children' ),
[Input('submit-button')],
[State('input-element', 'value')],
[Event('submit-button', 'click'])
def update_output(input_element):
print(input_element)
谢谢
【问题讨论】:
标签: python-3.x plotly plotly-dash