![](/img/trans.png)
[英]How to convert input field type=“password” to type=“text” in angular?
[英]how to convert text to * without any use of input type=“password”
我想使用聚合物元素,但我的問題是紙張輸入不支持type =“ password”,因此如何將輸入字符轉換為*
onedit,獲取新字符,將其添加到字符串中,從文本框中刪除該字符並添加“ *”。
我使用type =“ password”的紙張輸入沒有問題。 您如何操作取決於所用聚合物的版本。
來自主人
<paper-input-decorator
id="password"
labelVisible
floatinglabel
error="Password must be 8 chars with numbers, letters and punctuation"
label="Password">
<input is="core-input" id="passWord" type="password" pattern="^(?=.*\d.*\d)[0-9A-Za-z!@#$%*]{8,}$" required>
</paper-input-decorator>
從0.4.2
<paper-input
id="passWord"
floatinglabel
pattern="^(?=.*\d.*\d)[0-9A-Za-z!@#$%*]{8,}$"
type="password"
label="Password"
required>
</paper-input>
更改出現后,我就此發表了一篇文章,並解釋了如何在答案中使用更改。 已更新為最新版本的聚合物,輸入驗證不再起作用
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.