簡體   English   中英

在 Angular 5 應用程序中將自動完成屬性設置為關閉

[英]set autocomplete attribute to off in Angular 5 Application

我想將 Angular 5 應用程序中的所有輸入元素的自動完成屬性設置為關閉。

對於一個輸入元素,我是這樣做的:

<input type="text" id="myInput" autocomplete="off"style="max-width: 170px;">

我想為所有輸入元素實現這一點。 有什么辦法可以在全球范圍內做到這一點嗎?

假設您在表單中輸入的元素比您可以使用的元素多:

<form action="/" method="get" autocomplete="on"> First name:<input type="text" name="fname"><br> E-mail: <input type="email" name="email"><br> <input type="submit"> </form>

句法:

<form autocomplete="on|off">

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM