Google浏览器中,click方法造成表单无故提交问题

HTML代码

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="../js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="../js/20170523/pb_1.js"></script>
<title>Insert title here</title>
</head>
<body>
    <form id="MTform">
        <div id="newinput"></div>
        <br>
        <button id="newpren">newpren</button>
        <button id="oldclass">oldclass</button>
    </form>

    <button id="submit">提交</button>
</body>
</html>

JS代码

$(function(){
    $("form button").click(
            function() {
                if ($(this).attr("id") === "input_1") {
                    $("#newinput").append(
                        "<input id=\"newclass\" placeholder=\"input_1\"  type=\"text\"/>");
                }
                if ($(this).attr("id") === "input_2") {
                    $("#newinput").append(
                        "<input id=\"oldclass\" placeholder=\"input_2\" type=\"text\"/>");
                }
            });
});

为什么在Google浏览器中会在成这种现象,360就没事呢?还是我代码哪里写的有问题?

对于标签,其默认的type值,在不同的浏览器有不同的值,Internet Explorer 的默认类型是 "button",而其他浏览器中(包括 W3C 规范)的默认值是 "submit",所以你最好手动为其加上type="button"或者type="submit"。另外,强烈建议form表单中不要使用标签,用代替。这两个的区别,你可以参照这篇博文:http://blog.csdn.net/lee_sire/article/details/50312301

提交

 <button id="submit" type="submit">提交</button>

type ='button '和 type='submit' 是有区别的