jQuery - Cancel form submit (using “return false”?)?

后端 未结 12 1597
盖世英雄少女心
盖世英雄少女心 2020-12-19 04:00

I\'m running into a bit of trouble while trying to cancel the submit of a form. I\'ve been following this tutorial (even though i\'m not making a login script), and it seems

12条回答
  •  醉梦人生
    2020-12-19 04:36

    How about this one?

    $('form[name=pForm]').on('submit',function()
    {
        console.log("(^o^)");
        return false;
    });
    

提交回复
热议问题