JSFiddle - React, Tailwind, and code Playground
HTML
<form id="search" method="post" action="">
<input type="text" name="uid" value="ptt">
<input type="submit" name="submit1" value="OK">
</form>
JavaScript
$("#search").on("submit", function(event){
event.preventDefault();
SearchHandle($(this));
/*
請問怎麼將return false移到 SearchHandle()裡面,
不讓原本的submit事件發生?
*/
});
function SearchHandle(oo) {
alert('Hi');
}