Answer the question
In order to leave comments, you need to log in
Radiobutton selection script and button click?
I'm trying to write a Greasemonkey script that should set true for a specific radiobutton and then click on a specific button (although it's the only one on the page). After a successful operation, another page opens, after which you need to return to the previous one and repeat everything again (select the desired "radio" and click on the button) - i.e. arrange a cycle.
I have not yet reached the return to the previous page and the cycle, because corny I can not select "radio" and click on the button.
<input type="radio" name="thisradio" value="123">
<input type="submit" onclick="send(); return false;" value="Запустить">
// ==UserScript==
// @name Скрипт БезИмени 648414
// @version 1
// @grant GM_openInTab
// @grant unsafeWindow
// @run-at document-start
// ==/UserScript==
document.querySelector('[name="thisradio"][value="123"]').checked = true;
document.querySelector('[value="Запустить"]').dispatchEvent(new MouseEvent('click'));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question