Search code examples
htmlsemantic-markup

What is the purpose of onclick event for noscript tag?


After reading http://www.w3schools.com/tags/tag_noscript.asp confused about onclick event on noscript tag.

Anybody knows the purpose?

If there is no purpose, why the hell they keep it?

Thanks for any answers in advance.


Solution

  • The DOM 0 events are inherited by most html elements, I just don't think they did anything to prevent noscript from inheriting those, and those would be useless indeed. I would not recommend using w3schools as a reference exactly for this purpose, because it does incorporate bad practices and sometimes the information is inaccurate, unclear and/or confusing.

    the #events it owns:

    <!ENTITY % events
     "onclick     %Script;       #IMPLIED  -- a pointer button was clicked --
      ondblclick  %Script;       #IMPLIED  -- a pointer button was double clicked--
      onmousedown %Script;       #IMPLIED  -- a pointer button was pressed down --
      onmouseup   %Script;       #IMPLIED  -- a pointer button was released --
      onmouseover %Script;       #IMPLIED  -- a pointer was moved onto --
      onmousemove %Script;       #IMPLIED  -- a pointer was moved within --
      onmouseout  %Script;       #IMPLIED  -- a pointer was moved away --
      onkeypress  %Script;       #IMPLIED  -- a key was pressed and released --
      onkeydown   %Script;       #IMPLIED  -- a key was pressed down --
      onkeyup     %Script;       #IMPLIED  -- a key was released --"
      >