I'm a beginner.
I'm using the js code as a bookmarklet, but I'm having trouble with the second line of clicking on the button.When I looked up the elements in the developer tool, it says name="#btnAAAA0"
.I'd like to investigate the cause, but what should I try?
javascript:!function(){
document.forms['ABCD'].elements['ABCDE'].value='XX';
document.querySelector("#btnAAAAA0").click();
}();
add
Dear Sayuri,
Thank you for your reply.
I changed the second line of JavaScript because the id and name of the element I wanted to click were as follows.
id=btnAAA0
name=btnAAA0
[After line 2 changes]
document.querySelector("[name=btnAAA0]").click();
I tried the bookmarklet again, but it still doesn't work.
·The screen will be updated, but it is different from the behavior when the button is pressed.
- It worked just once.(It looked like I said it.)
Please let me know if there is anything else I should look into.
javascript
document.querySelector("#btnAAAA0").click();
As for the part,
"#btnAAAAA0"
matches id="btnAAA0"
.
If you want to match name="#btnAAAAA0"
,
document.querySelector("[name=#btnAAA0]") .click();
Shouldn't we do this?
524 Uncaught (inpromise) Error on Electron: An object could not be cloned
545 Understanding How to Configure Google API Key
544 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
540 Unable to install versioned in Google Colab
546 Who developed the "avformat-59.dll" that comes with FFmpeg?
© 2024 OneMinuteCode. All rights reserved.