Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

i can click HTML a tag(anchor tag) even after disable.

  • 2 trả lời
  • 14 gặp vấn đề này
  • 7 lượt xem
  • Trả lời mới nhất được viết bởi Jigarp

more options

i have applied a tag(HTML anchor tag) click on my page and now i have disabled a tag from the javascript , but still i can click on this and not gets disabled.

the problem with firefox only, in IE 8 it works fine.

Plz help on this.

i have applied a tag(HTML anchor tag) click on my page and now i have disabled a tag from the javascript , but still i can click on this and not gets disabled. the problem with firefox only, in IE 8 it works fine. Plz help on this.

Tất cả các câu trả lời (2)

more options

Can you post a link to a publicly accessible page that doesn't require authentication (signing on) or possibly post the code that you used?

more options
  • <a id="link1" onclick="alert('1');">SPT</a>
  • <a onclick="alert('2');">Basic Information</a>
  • <a onclick="alert('3');">Federal</a>

<asp:Button ID="Button1" runat="server" OnClientClick="disableControls();" Text="Disable links"/>

Script

function disableControls() {

           document.getElementById('link1').disabled = true;
       }


Above script code is for disabling anchor tag 'link1' on click of button1. I can still clik on link1 and get alert '1'.

thnx for the reply... cor-el