在Android Cordova应用程序中关闭textarea和inputfields的自动完成功能 [英] Turning off auto-complete for textarea and inputfields in Android Cordova-app

查看:211
本文介绍了在Android Cordova应用程序中关闭textarea和inputfields的自动完成功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Cordova(1.9.0),html5,javascript开发Android应用程式(2.3.3)。

I'm working on an Android app (2.3.3) using Cordova (1.9.0), html5, javascript.

这是一种语言训练工具,用户在textareas或inputfields中输入他们的答案,我不希望他们看到建议。

It's a language training tool so when users type their answers in textareas or inputfields, I don't want them to see suggestions.

我在textarea和input标签中尝试了autocomplete =off好像在形式标签,但都不工作。有谁知道如何关闭这些建议?

I've tried autocomplete="off" in the textarea and input tag as well as in the form tag, but neither work. Does anyone know how to turn these suggestions off?

我的test-html如下所示:

my test-html looks like this:

<div><b>With form:</b>
    <form autocomplete="off">
        <p>Wie   <input size="5" value="b" autocorrect="off" autocapitalize="off" autocomplete="off" spellcheck="false">  jij?</p>
        <textarea spellcheck="false" autocorrect="off" autocapitalize="off" autocomplete="off"></textarea>
    </form>
</div>
<div><b>No form:</b>
    <p>Jan, ik   <input size="5" value="b" autocorrect="off" autocapitalize="off" autocomplete="off" spellcheck="false">  Jan.</p>
    <textarea spellcheck="false" autocorrect="off" autocapitalize="off" autocomplete="off"></textarea>
</div>

更新:
我创建了一个html-testpage并使用Android手机浏览,仍然遇到相同的自动完成/建议问题。所以也许这不是一个Cordova应用程序问题,但Android浏览器问题?
查看(在Android手机上) http://jsfiddle.net/f3AJq/

推荐答案

在cordova应用程序中,至少Android 4.4,html5属性autocomplete =off如上所述没有任何效果。
然而在Android 6 autocomplete =关闭工作!

Up until at least Android 4.4 in cordova apps, the html5 attribute autocomplete="off" as described above does not have any effect. However on Android 6 the autocomplete="off" does work!

这取决于Android版本,而不是html。

So it depends on the Android version, not the html.

(这是一个cordova 5.1.1 android平台,万一有人想知道)

(This is a cordova 5.1.1 android platform, in case anyone is wondering)

这篇关于在Android Cordova应用程序中关闭textarea和inputfields的自动完成功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆