类型为“submit”的纸按钮在窗体内不提交? [英] paper-button with type="submit" within form doesn't submit?
本文介绍了类型为“submit”的纸按钮在窗体内不提交?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图使用纸按钮
与类型
属性设置为提交
(与按钮
元素一样)提交封闭的表单
原因是它无法提交表单。这是一个错误或功能?
I am trying to use paper-button
with type
attribute set to submit
(as one would do with button
element) to submit the enclosing form
, but for some reason it is unable to submit the form. Is this a bug or feature?
如何使纸按钮
提交表单?
PS:我在飞镖地(不是js)。
PS: I am in dart land (not js).
推荐答案
按钮元素内的按钮:
<paper-button>
<button>Sign Up</button>
</paper-button>
然后使用下面的CSS来隐藏原生按钮,同时确保它的hitzone填充整个paper-button元素:
Then use this following CSS to hide the native button while ensuring it's hitzone fills the entire paper-button element:
<style shim-shadowdom>
paper-button {
padding:0;
}
paper-button::shadow .button-content {
padding:0;
}
paper-button button {
padding:1em;
background-color: transparent;
border-color: transparent;
}
paper-button button::-moz-focus-inner {
border: 0;
}
</style>
这篇关于类型为“submit”的纸按钮在窗体内不提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文