How to fill in form field, and submit, using javascript?

后端 未结 5 1667
渐次进展
渐次进展 2020-11-29 23:34

If I have an html document whose rough structure is





5条回答
  •  佛祖请我去吃肉
    2020-11-30 00:38

    This method helped me doing this task

    document.forms['YourFormNameHere'].elements['NameofFormField'].value = "YourValue"
    document.forms['YourFormNameHere'].submit();
    

提交回复
热议问题