Taewan Taewan - 1 year ago 271
Javascript Question

How can I submit the form with input value in Chrome Browser Console?

I am trying to manually submit the form in chrome developer console by typing similar code as


How can I specify the input value of the form in this code? I know the input id/name.

Answer Source
document.querySelector('input[name="theNameOfYourInput"]').value = 'theValue';

Chrome console knows nothing of jQuery. Use vanilla JS.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download