我有html
形式,当我点击submit
按钮页转到insert.php 我不惯于它 preventDefoult不工作 我有这个script
HTML的preventDefault不工作,提交按钮
HTML
<form action="insert.php" method="post">
<input type="text" name="username" placeholder=""><br />
<input type="text" name="name" placeholder=""><br />
<input type="text" name="lastname" placeholder=""><br />
<input id="mail" name="email" type="text" placeholder="E-mail"><br />
<input id="mail_1" type="text" placeholder="reply E-mail"><br />
<input id="password" name="password" type="password" placeholder=""><br />
<input id="password_1" type="password" placeholder=""><br />
<input id="submit" type="submit" value="registration">
</form>
jQuery的
$("#submit").click(function(event){
event.preventDefault();
});
破碎JS ....... – Rooster
??什么/? @Rooster –
PHP和MySQL几乎没有任何关系(标签编辑,PHP代码已被删除) - 请根据未来的问题进行标记,并且仅发布相关代码。 – CBroe