search

Home  >  Q&A  >  body text

javascript - Why can't the submit event be triggered here?


Nothing happens when I click the Button, it feels right

我想大声告诉你我想大声告诉你2857 days ago616

reply all(3)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-19 10:39:50

    Only form has submit event

    reply
    0
  • PHPz

    PHPz2017-05-19 10:39:50

    Submit can only be triggered when it is written in the form. What he submitted is the form

    reply
    0
  • 给我你的怀抱

    给我你的怀抱2017-05-19 10:39:50

    1. If you use it this way, you need to add a <form></form> tag externally. You can activate submit by pressing Enter, and there is no need to write js.

    2. If you don’t want to add a layer of <form></form> tags, then you can listen to the onclick event of the button.

    reply
    0
  • Cancelreply