1

原来在 Safari 下 JS 函数名不能为 submit = =!

 2 years ago
source link: https://www.v2ex.com/t/849214
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  程序员

原来在 Safari 下 JS 函数名不能为 submit = =!

  jdkl · 9 小时 44 分钟前 · 273 次点击

用 flask 写了一个简单的小网页,使用 ajax 提交 post 请求,为了方便,函数名起了个 submit 。在 Android 、PC 、Mac 的 chrome 下测试都没问题。偏偏在 iPhone 和 Mac 的 Safari 下出了状况。

一开始以为是 jquery 的问题,换了 cdn 和从本地拉取都是一样。又以为是 flask 的问题,但怎么看都没问题。

后来才感觉函数名 submit 有点蹊跷,改了下好了。

还是自己太年轻= =


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK