JS弹窗事件无法触发,请问是什么问题

代码在下面,请问为什么这个弹窗不能正常弹出?
我希望的功能是点击登录按钮会获取账户密码进行匹配,匹配不到时弹出弹窗,但是好像无法实现。
这个是body中的一部分

<form method="post" action="/login">
            用户 : <input name="name" type="text" size="15" maxlength="30" placeholder="请输入账号"><br>

            密码 : <input name="pasword" type="password" size="15" maxlength="30" placeholder="请输入密码"><br>
        <input type="submit" value="登录" style="position: absolute;width:40%;left:10px;" onclick="noname()"/></form>

        <a href="zhuce"><button style="right:10px;position: absolute;width:40%;">注册</button></a>

JS部分

    function noname(){
        const user_name = alluser;
        const name = document.getElementsByName("name");
        const password = document.getElementsByName("pasword");
        for(var i in user_name){
            if(name == i[1] && password==i[2]){
                 found = true;
            }
        }
        if(!found){
        alert('不存在该账号')}
    }

alluser哪里来的?