form提交表單

<form action="http://localhost:8080/GD/LoginAction_execute.action">
用戶名:<input type="text" name="user.username"><br>
密碼:<input type="text" name="user.password"><br>
    <input type="submit" value="登錄">
    <input type="button" value="返回註冊" οnclick="jumptoregist()">
</form>

點擊按鈕跳到註冊頁面

<script>
    function  jumptoregist() {
        document.location.href="regist.html";
    }
</script>

如何提交的表單不跳轉

 <form action="XXX" method="post"  name="uploadfile" target="id_iframe">
 </form>
 <iframe id="id_iframe" name="id_iframe" style="display:none;"></iframe>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章