Sayfalar

19 Şubat 2014 Çarşamba

REMOVE HTML FORM HISTORY

When filling out a form for user input while most of the time that we have previously entered values ​​the browser remembers. Sometimes we even wrote an entry on the site, also remembers another site. You may want to avoid this. There are two different ways to do it.

1. Using JQuery 

Only for the specified input element:

$("#input_id").attr("autocomplete""off");

For all form elements:

$("input").attr("autocomplete""off");


2. Using Html "autocomplete" Attribute

Only for the specified input element:

<input type="text" autocomplete="off" value="" />

For all form elements:

<form name="form1" id="form1" method="post" autocomplete="off">

Hiç yorum yok:

Yorum Gönder