iphone - 为什么 @contenteditable 不能在 iPhone 上运行?

标签 iphone safari contenteditable mobile-safari

Safari HTML Reference: Supported Attributes说:

contenteditable

If true, the element can be edited on the fly; if false, it cannot.

Availability

Available in Safari 1.2 and later. Available in iPhone OS 1.0 and later.

但是,在我的 iPhone 上,我无法让它工作。有人成功做到这一点吗?

您可以尝试使用 this document (诚​​然不是纯 html,但该文档适用于桌面版 Safari、Chrome 和 Firefox 3)。我什至无法让最简单的 html 文档在移动 Safari 中进行编辑。

最佳答案

根据 WWDC 2011 的开发者视频之一,

contenteditable 已添加到 iOS 5 beta 2 中。我建议注册 Apple 的 Safari developer program并从 WWDC 视频页面下载该视频。

如果您注册成为 Safari 开发者,您还可以获得将您的网站提交到他们的在线 iOS Web 应用程序库的特权。

编辑:我已经确认这适用于运行 iOS 5.0.1 的 iPad。在这里尝试一下:http://www.quirksmode.org/dom/execCommand/

关于iphone - 为什么 @contenteditable 不能在 iPhone 上运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/723592/

相关文章:

iphone - 导航到下一页时显示白屏 iPhone

iphone - 屏幕解锁时 Apple 推送通知不会到达

html - 行内 block 元素在 Safari 中不垂直对齐

iphone - Safari 阅读器有 API 吗?

ios - 具有可编辑 UIWebView 的自定义键盘?

iphone - label.layer.borderColor = .... 不工作(Xcode 4.3.2)

iphone - AFNetworking 缺少哪些主要的 ASIHTTPRequest 功能?

css - Align-Self 的 Flexbox 问题

jquery - 单击另一个元素时不要失去焦点

HTML5 - contenteditable ="false"嵌套在 contenteditable ="true"