async function submit() {
    const account = document.getElementById("account").value;
    const password = document.getElementById("password").value;
    let data = {account : account, password : password};
    let suc_login = await axios.post('/api/login', data);
    suc_login = suc_login.data;
    if (suc_login.suc) {
        if (!suc_login.is_assistant) {
            // student
            location.href = `/main?name=${suc_login.name}&s_num=${account}`;
        }
        else {
            // assistant
            location.href = `/audit?name=${suc_login.name}&s_num=${account}`;
        }
    }
    else {
	    alert("帳號或密碼錯誤");
    }
}
