Skip to content

Instantly share code, notes, and snippets.

@CarlMungazi
Created November 18, 2019 20:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CarlMungazi/2a72f3d80b78648c94e074386cfd3308 to your computer and use it in GitHub Desktop.
Save CarlMungazi/2a72f3d80b78648c94e074386cfd3308 to your computer and use it in GitHub Desktop.
m.render(document.getElementById('app'),
m('form', {
onreset: (e) => {
console.log('resetting form...')
},
onsubmit: (e) => {
e.preventDefault();
console.log('submitting form...')
},
}, [
m('button', { type: 'reset'}, 'Reset'),
m('button', { type: 'submit'}, 'Submit')
])
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment