如何删除android设备上表单文本框中出现的默认文本?

如何删除android设备上表单文本框中出现的默认文本?,android,html,jquery-ui,jquery-mobile,Android,Html,Jquery Ui,Jquery Mobile,我有一个基于html5的移动应用程序。在应用程序中,我有一个输入用户ID和密码的表单。但在android设备中,当我将光标放在文本框内时,会出现一些默认文本,如图所示 如何删除此默认文本 XML: 您给出的android:hint 属性设置为Edittext,此时将显示该属性。移除它 如果您正在谈论提示,可以将其设置为textB.setHint(“String”) 或者从文本框xml声明中设置android:hint。 <EditText android:id="@+id/em

我有一个基于html5的移动应用程序。在应用程序中,我有一个输入用户ID和密码的表单。但在android设备中,当我将光标放在文本框内时,会出现一些默认文本,如图所示

如何删除此默认文本

XML:


您给出的
android:hint

属性设置为Edittext,此时将显示该属性。移除它

如果您正在谈论提示,可以将其设置为
textB.setHint(
“String”)

或者从文本框xml声明中设置android:hint。


 <EditText
    android:id="@+id/email"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:hint="Email Address"
    />

   <EditText
    android:id="@+id/password"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:hint=" Password "
    android:inputType="textPassword"
     />

谢谢你,但我不知道如何使用javascript和Html5来使用它。我没有用phonegap/java开发我的应用程序。你能建议一下吗?基本上你知道它叫提示,为什么不尝试搜索一下如何从html5设置提示,坦白地说,我不知道html的H:)谢谢Hardik,但我不确定是否要使用它,因为我的应用程序是使用javscript在html5中开发的,所有的数据调用都是通过C#中的web处理程序进行的。对不起,伙计,我不知道html5中的提示。我如何使用javascript/jquery/Css来实现这一点。我没有使用phonegap。您在inputType中将textbox的值指定为“电子邮件地址”或占位符了吗?您必须在输入标记中将占位符指定为“电子邮件地址”。这就是为什么它显示在textbox中的原因。这就是我正在使用的代码。代码对我来说似乎很完美。请刷新并尝试再次运行。我正在设备上运行它。该应用程序是实时的。希望我能和你分享网址:'(
 <EditText
    android:id="@+id/email"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:hint="Email Address"
    />

   <EditText
    android:id="@+id/password"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:hint=" Password "
    android:inputType="textPassword"
     />