我无法提交我的铁表。此时我只需要在控制台中查看内容,但是在尝试提交表单时,我只收到错误消息:未捕获的 TypeError:无法读取 null 的属性“提交”。我可能错过了一些明显的东西。我一直在使用该页面:https ://www.webcomponents.org/element/PolymerElements/iron-form
<iron-form id="sizeForm">
<form method="post" action="">
<paper-dropdown-menu label="Choose type" on-iron-select="_typeSelected">
<paper-listbox slot="dropdown-content">
<paper-item value="Sneakers">Sneakers</paper-item>
<paper-item value="Shoes">Shoes</paper-item>
<paper-item value="T-shirts">T-shirts</paper-item>
<paper-item value="Jeans">Jeans</paper-item>
</paper-listbox>
</paper-dropdown-menu>
<add-sneakers hidden$="{{hideSneakers}}"></add-sneakers>
<paper-button onclick="{{_submitForm}}">Accept</paper-button>
<div class="output"></div>
</form>
</iron-form>
<script>
_submitForm() {
document.getElementById('sizeForm').submit();
}
</script>