血翼残飞

导航

js document创建form post 提交

                var form = document.createElement('form');
                form.action = 'xxxx.action';
                form.method = 'post';
                form.style.display = 'none';
                var input = document.createElement('input');
                input.name = 'user';
                input.value = xxx;
                form.appendChild(input);
                document.body.appendChild(form);
                form.submit();
                return form;                    

 

posted on 2021-03-16 09:40  血翼残飞  阅读(715)  评论(0编辑  收藏  举报