xxxxxxxxxx
<script>
function myFunction() {
alert("ALERT");
}
</script>
<button onclick="myFunction()">Click</button>
xxxxxxxxxx
<script>
function myFunction() {
alert("ALERT");
}
</script>
<button onclick="myFunction">Click</button>
xxxxxxxxxx
if st.button('add'):
result = add(1, 2)
st.write('result: %s' % result)