【问题标题】:I can't find "name" attribute while inspecting input elements of google form. How to find it?在检查谷歌表单的输入元素时,我找不到“名称”属性。如何找到它?
【发布时间】:2020-12-04 11:01:36
【问题描述】:
我有一个 html 表单,我想从中将数据存储到谷歌电子表格。我创建了 google 表单,但是当我尝试检查 name 属性以将其与 HTML 表单属性链接时,我找不到任何东西。我想要 name="entry.###" 属性。这是我在检查输入元素时所说的:
<input type="text" class="quantumWizTextinputPaperinputInput exportInput" jsname="YPqjbf" autocomplete="off" tabindex="0" aria-labelledby="i1" aria-describedby="i2 i3" dir="auto" data-initial-dir="auto" data-initial-value="">
【问题讨论】:
标签:
javascript
html
google-sheets
google-sheets-api
google-forms
【解决方案1】:
如果你创建一个https://docs.google.com/forms/d/XXX/prefill类型的预填充链接,你可以获得name属性
右键单击其中一个答案字段并选择Inspect
你应该看到一个元素如下:
<input type="text" class="quantumWizTextinputPaperinputInput exportInput"
jsname="YPqjbf" autocomplete="off" tabindex="0" aria-label="Untitled question"
aria-describedby="i.desc.1567593859 i.err.1567593859" name="entry.975751923"
value="" dir="auto" data-initial-dir="auto" data-initial-value="" aria-invalid="false">
【解决方案2】:
我和 OP 有同样的问题。我对 ziganotschka 的回复感到困惑,但我发现 Google 表单中的三点菜单显示了“获取预填链接”选项。然后,显示名称属性。