dkl*_*dkl 6 html passwords android webkit placeholder
我无法摆脱密码文本框中不需要的占位符(或水印).当密码文本框被聚焦时,Android Web浏览器显示占位符超过关联的标签元素,如下所示:

HTML源代码:
<form method="post">
<label for="userName">Login name:</label>
<input id="userName" name="userName" type="text" value="" />
<label for="password">Password:</label>
<input id="password" name="password" type="password" />
<input type="submit" id="submit" name="submit" value="Log In" />
</form>
Run Code Online (Sandbox Code Playgroud)
注意:
编辑:
尝试了另一种变体(避免使用"for"属性),但占位符仍然存在:
<label>Password: <input id="password" name="password" type="password" /></label>
Run Code Online (Sandbox Code Playgroud)
我认为你需要 android 中的占位符。为此,请使用 Edittext 的属性
android:hint="用户名"
<EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:inputType="textNoSuggestions" android:id="@+id/textName" android:hint="Username"></EditText>
<EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:inputType="textEmailAddress" android:id="@+id/textEmail" android:hint="Email"></EditText>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4954 次 |
| 最近记录: |