top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to disable an HTML object using javascript?

+1 vote
473 views
How to disable an HTML object using javascript?
posted Aug 1, 2014 by Rahul Mahajan

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes
document.getElementById("myObject").disabled = true;

The above written javascript code will disable your selected HTML element.

answer Aug 5, 2014 by Amanpreet Kaur
Similar Questions
+5 votes

I need disable all refresh events

Example.

  1. F5,
  2. Mouse right click option (refresh/reload),
  3. CTRL+R,
  4. Menu bar -> view -> refresh and
  5. URL refresh/reload button

How to disable these all events by using javascript...

Advance thanks....

...