Taewan Taewan - 1 month ago 23x
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.

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

Chrome console knows nothing of jQuery. Use vanilla JS.