这是我的表格:
<form is="iron-form" action="{{url('/user/store')}}" id="registerForm" method="POST">
<input type="hidden" name="_token" value="{{csrf_token()}}">
<paper-input name="email" label="E-mail" type="email"></paper-input>
<paper-input name="password" label="password" type="password"></paper-input>
<paper-button raised onclick="submitLRForm(event);">Submit form</paper-button>
</form>
在 google chrome 中,它通过 ajax 发送表单数据,但在 firefox 中,它以正常方式执行(重定向到 /user/store
)
如有任何帮助,我们将不胜感激。
谢谢, G3
最佳答案
我在 Linux 下使用 Firefox 44 时遇到了同样的问题,将 webcomponents-lite
替换为 webcomponents
解决了这个问题,即:
<script src="bower_components/webcomponentsjs/webcomponents.min.js"></script>
更新:
供引用并根据docs ,精简版包括
support for just Custom Elements and HTML Imports. This is useful if you don't require Shadow DOM in your application.
从 FireFox 44 开始,默认情况下不支持 Shadow DOM(请参阅 here ),但可以在 about:config
下使用 dom.webcomponents.enabled
键启用它>.
关于javascript - polymer 形式在 Firefox 中不支持 Ajax-ing,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31611485/