开发者

How can I change a button from going to the next page to doing some code?

开发者 https://www.devze.com 2023-04-09 03:57 出处:网络
I am new to perl/html. This is from a perl file. This button is in there right now: <button id = \"button1\" name = \"submitButton\" type=\"submit\">

I am new to perl/html. This is from a perl file. This button is in there right now:

<button id = "button1" name = "submitButton" type="submit">
       <span class="right">Submit</span>
</button>

I don't see any piece of code where submitButton or button1 is given any logic so I don't understand why this jumps to the next page. Can someone explain?

EDIT: Thi开发者_如何学运维s seems to be the only javascript in the whole file...

  <script type="text/javascript">
  % $m->comp('../js/share.js');
  </script>

I looked at the file, and it doesn't seem to do any redirecting or anything.


Often event handlers are hooked up at run-time using JavaScript. If there is an included script, look in the code for "button1" and see which function is hooking it up.

Also since this is a SUBMIT button, if it is wrapped in a form, no code needs to hook this up. It will post to whatever is defined in the form's ACTION property.


Maybe there is some JS/Jquery or another js-framework included to the page?


Since this is a submit button, it does the logic defined by the Form that surrounds it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号