【问题标题】:Javascript set Dropdown value on Google FormsJavascript 在 Google 表单上设置下拉值
【发布时间】:2021-04-21 18:33:06
【问题描述】:

我创建了用户脚本/插件来填充谷歌表单的输入,但我无法更改下拉列表的值。

demo page 和我的尝试

document.querySelector('.quantumWizMenuPaperselectOption.exportOption').click()
document.querySelectorAll('.quantumWizMenuPaperselectContent.exportContent')[1].click()

【问题讨论】:

    标签: javascript google-forms


    【解决方案1】:

    已解决,.quantumWizMenuPaperselectContent.exportContent 有 4 个元素,所以我需要选择最后一个元素

    document.querySelectorAll('.quantumWizMenuPaperselectContent.exportContent')[3].click()
    

    或更改选择器

    document.querySelectorAll('.exportSelectPopup div span')[1].click()
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-14
      • 1970-01-01
      • 1970-01-01
      • 2015-01-03
      相关资源
      最近更新 更多