Disabled attribute of hyperlinkDisabledLearn_html/css_WEB-ITnose
You can set the hyperlink's Disabled attribute to true and false to determine whether the hyperlink can be clicked
For example:
bai du
The above means that you don’t want bai du’s hyperlink to take effect, but when click Without any constraints and judgments, when you click Baidu, it will naturally jump to the Baidu page. This is the bug of disabling attributes of hyperlinks in HTML
You can add the following js constraints to determine whether the hyperlink can be used
The following bug solution provided by Microsoft:
With the help of global variables, use other buttons to change the disabled attribute to get disabled Effect of the attribute.;
BUG: The DISABLED attribute no longer disables hyperlinks
Although the DISABLED attribute is set to True a hyperlink is in the following,
Where do you want to go today?
Users can still click the hyperlink and Internet Explorer navigates to the selected page.
To resolve this issue, set the onclick event of the hyperlink to return true or false based on the current execution context. The following code sets the value of a global Microsoft JScript variable to true or false , depending on the button click. The DISABLED property of the target hyperlink object is updated so that it can properly communicate its disabled state to other objects and scripting functionality on the page.
<SCRIPT> <br>var canNav = false; <br>function canNavigate () { <br>return canNav; <br>} <br>function load() { <br>document.all("btn1").innerText = "Link status == " canNav; <br>} <br> <br>function setNavigate(linkObj, canNavParam) { <br>if (linkObj != null) { <br>if (canNavParam == false) { <br>linkObj.disabled = true; <br>} else { <br>linkObj.disabled = false; <br>} <br>canNav = canNavParam; <br>} <br>} <br><br>function updateBtnStatus(btnName) { <br>var btn = document.all(btnName) ; <br>if (btn != null) { <br>document.all(btnName).innerText = "Link status == " canNav; <br>} <br>} <br></SCRIPT>
Click here
Reference: http://support.microsoft .com/kb/253579/zh-cn

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



HP devices usually come with security software pre-installed, and many people wonder how to disable HPWolfSecurity on Windows 11. The reason for this is that this software can cause certain problems and conflict with other applications, so today we will show you how to disable it. Is HPWolfSecurity bloatware? This is a legitimate application from HP, but it often comes pre-installed and causes performance issues and conflicts with other security software, which is why many people consider it bloatware. How to disable HPWolfSecurity on Windows 11? 1. Use the system tray icon to find HPWolfSecurity in the system tray

When you click the search field in Windows 11, the search interface automatically expands. It displays a list of recent programs on the left and web content on the right. Microsoft displays news and trending content there. Today's check promotes Bing's new DALL-E3 image generation feature, the "Chat Dragons with Bing" offer, more information about dragons, top news from the Web section, game recommendations, and the Trending Search section. The entire list of items is independent of your activity on your computer. While some users may appreciate the ability to view news, all of this is abundantly available elsewhere. Others may directly or indirectly classify it as promotion or even advertising. Microsoft uses interfaces to promote its own content,

Taskbar thumbnails can be fun, but they can also be distracting or annoying. Considering how often you hover over this area, you may have inadvertently closed important windows a few times. Another disadvantage is that it uses more system resources, so if you've been looking for a way to be more resource efficient, we'll show you how to disable it. However, if your hardware specs can handle it and you like the preview, you can enable it. How to enable taskbar thumbnail preview in Windows 11? 1. Using the Settings app tap the key and click Settings. Windows click System and select About. Click Advanced system settings. Navigate to the Advanced tab and select Settings under Performance. Select "Visual Effects"

With memory compression on Windows 11, your device will choke even with a limited amount of RAM. In this article, we will show you how to enable or disable memory compression on Windows 11. What is memory compression? Memory compression is a feature that compresses data before writing it to RAM, thus providing more storage space on it. Of course, more data stored in physical memory translates into faster system operation and better overall performance. This feature is enabled by default in Windows 11, but if it's somehow not active, you can disable or re-enable it. How to enable memory compression in Windows 11? Click the search bar, type powershell, and click

How to solve the problem that hyperlinks cannot be opened. With the rapid development of the Internet, hyperlinks have become an indispensable part of our daily lives. We often see and use hyperlinks on various platforms such as web pages, emails, and social media. However, sometimes we may encounter problems with hyperlinks not opening, which makes us confused and frustrated. In this article, we will discuss the reasons why hyperlinks cannot be opened and their solutions, hoping to help you solve this problem. First, let us understand the possible reasons why hyperlinks cannot be opened. The following are some common

In recent years, with the continuous development of network technology, our lives are inseparable from various digital tools and the Internet. When processing documents, especially in writing, we often use word documents. However, sometimes we may encounter a difficult problem, that is, the hyperlink in the word document cannot be opened. This issue will be discussed below. First of all, we need to make it clear that hyperlinks refer to links added in word documents to other documents, web pages, directories, bookmarks, etc. When we click on these links, I

How to disable the laptop's built-in keyboard in win11 and only use the external one? Details: We need to use an external keyboard when using a win11 computer, but many users choose to disable the laptop's built-in keyboard and only use an external keyboard. So how do you do this? Users can directly click cmd under the search bar and then perform operations. Let this site give users a detailed introduction on how to disable the laptop's built-in keyboard in win11 and only use an external one. Detailed explanation on how to disable the laptop's built-in keyboard in Win 11 and only use an external keyboard. 1. Click the Start menu at the bottom of the computer or search. 3. Enter cmd and click on the right to run as administrator. 5. If you want to restart, you can return to this location and enter scconfigi804

Microsoft's Windows 11 operating system may periodically display suggestions as pop-ups on your computer using the notification system. The suggestions system, originally intended to provide users with tips and suggestions for improving their Windows 11 workflows, has almost completely transformed into an advertising system to promote Microsoft services and products. Suggestion pop-ups might advertise a Microsoft 365 subscription to users, suggest linking an Android phone to the device, or set up a backup solution. If these pop-ups annoy you, you can tweak your system to disable them entirely. The following guide provides recommendations on disabling pop-ups on devices running Microsoft’s Windows 11 operating system.
