Hello all! In this article, we will talk about how to disable a tag in jquery. if you have question about how to disable a anchor tag in jquery then i will give simple example with solution. we will help you to give example of disable anchor tag in html. let’s discuss about how to disable anchor tag in html using javascript. Follow bellow tutorial step of how to disable a tag in html.
If you want to disable a tag then i will give you several examples of how to disable anchor tag using css, jquery and javascript.
so, let's see bellow some simple example that will help you how to disable a tag href in html.
Example 1:
<!DOCTYPE html>
<html>
<head>
<title>How to Disable a Anchor Tag in HTML? - HDTuto.com</title>
<style type="text/css">
a.disabled {
pointer-events: none;
cursor: default;
opacity: .6;
}
</style>
</head>
<body>
<h1>How to Disable a Anchor Tag in HTML? - HDTuto.com</h1>
<a href="https://www.itsolutionstuff.com" class="disabled">Go to HDTuto.com</a>
</body>
</html>
Example 2:
<!DOCTYPE html>
<html>
<head>
<title>How to Disable a Anchor Tag in HTML? - HDTuto.com</title>
</head>
<body>
<h1>How to Disable a Anchor Tag in HTML? - HDTuto.com</h1>
<a href="https://www.itsolutionstuff.com" onclick="return false;">Go to HDTuto.com</a>
</body>
</html>
Example 3:
<!DOCTYPE html>
<html>
<head>
<title>How to Disable a Anchor Tag in HTML? - HDTuto.com</title>
</head>
<body>
<h1>How to Disable a Anchor Tag in HTML? - HDTuto.com</h1>
<a href="javascript:function() { return false; }">Go to HDTuto.com</a>
</body>
</html>
Example 4:
<!DOCTYPE html>
<html>
<head>
<title>How to Disable a Anchor Tag in HTML? - HDTuto.com</title>
<style type="text/css">
a[disabled="disabled"] {
pointer-events: none;
}
</style>
</head>
<body>
<h1>How to Disable a Anchor Tag in HTML? - HDTuto.com</h1>
<a href="https://www.itsolutionstuff.com" disabled="disabled">Go to HDTuto.com</a>
</body>
</html>
I hope it can help you...
Do you like below Tutorials ?
- PHP Laravel 5.5 - import export data into excel and csv using maatwebsite
- Laravel 7.x and 6.x create custom facade example from scratch
- Node JS - Get Real time online users counter using socket io example
- PHP Laravel 7.x and 6.x - Bootstrap Admin Theme Integration example from scratch
- MySQL Query - How to select records of today to next Sunday ?
- Laravel 7.x and 6.x - username custom validation example
- Laravel 5.5 - Import Extract zip file using chumper/zipper package
- PHP Laravel Set Custom Validation Error Messages Example