用了alert和function函数,不出弹框啊?

<html xmlns="http://www.w3.org/1999/xhtml&...
<head runat="server">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>提交</title>

</head>
<body>

<form id="form1" runat="server" action="WebForm25.aspx" onsubmit="return form1Submit();">
    <div>
        <label>
            姓名:          <input id="nameInput" type="text" />
        </label>
        <input type="submit" value="提交" />
    </div></form><script type="text/javascript">
    function form1Sumbit() {        var nameInput = document.getElementById("nameInput");        if (nameInput.value == "") {
            alert("【请输入姓名】!");
            nameInput.focus();            return false;
        }
    }</script>

</body>
</html>
为啥不出弹框呢?求解


阿波罗的战车
浏览 1048回答 1
1回答

神不在的星期二

楼主拼错名字了吧 Submit...
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript