简体   繁体   English

需要帮助通过javascript提交此特定表单

[英]Need help submitting this particular form via javascript

Ok so ive spent quite a while trying to find a JS command that will submit this page: 好的,所以我花了很长时间试图找到将提交此页面的JS命令:

https://ta.yrdsb.ca/yrdsb/ https://ta.yrdsb.ca/yrdsb/

Heres a few of the commands I've tried so far that I really thought would work, but didnt (I obviously tried them all separately): 到目前为止,我已经尝试了一些我确实认为可以使用的命令,但是没有(我显然单独尝试了所有命令):

document.getElementById('loginForm').submit();

(function() {document.getElementById("loginForm").submit();});

document.querySelectorAll("button[type='submit']")[0].click();

function () {querySelectorAll("button[type='submit']")[0].click;}

If someone can get me a command that will successfully submit this page, that would be amazing. 如果有人能给我一个可以成功提交此页面的命令,那就太好了。

Thanks in advance. 提前致谢。

formRef.submit isn't a function that submits the form, it is a reference to the input with the name and/or id submit . formRef.submit不是提交表单的功能,它是与所述名称和/或ID的输入的参考submit

You've destroyed the submit function. 您已破坏了Submit函数。

Either rename the form control, or get a submit function from another form. 重命名表单控件,或从另一个表单获取提交功能。

document.createElement('form').submit.apply( document.getElementById('loginForm') );

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM