Javascript Input Disable Autocomplete Example


Share:
Published By: Admin, Published On: Jun 19, 2021, Category: Javascript

Hello Friends,

Now let's see example of how to input disable autocomplete example. We will use how to input disable autocomplete in javascript. Here you will learn how to use javascript input disable autocomplete. This is a short guide on input disable autocomplete. Let's get started with how to get input disable autocomplete in javascript.

Here i will give you many example how you can input disable autocomplete javascript.

Example :
<!DOCTYPE html>
<html>
	<head>
		<title>Javascript Input Disable Autocomplete Example</title>
		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"/>
	</head>
	<body>
		<div class="container mt-5">
			<div class="row">
				<div class="col-md-6 offset-md-3">
					<div class="card">
						<div class="card-header">
							<h5>Javascript Input Disable Autocomplete Example</h5>
						</div>
						<div class="card-body">
							<form action="" class="form">
								<label>Enter Name:</label>
								<input class="form-control" type='text' />
								<input type="submit" class="btn btn-primary mt-2">
							</form>
						</div>
					</div>
				</div>
			</div>
		</div>
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
		<script type="text/javascript">
			$(document).ready(function(){
			  	$('.form').attr('autocomplete', "off");
			});
		</script>
	</body>
</html>
Output :
Student(autocomplete is off)

It will help you...

Share: