onfocus

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org" />
<title>onfocus</title>
</head>
<body>
<form action="">
<p><input type="text" name="focus" onfocus="alert()" /></p>
</form>
</body>
</html>

Tidy output

Tidy (vers 30th April 2000) Parsing console input (stdin)
line 11 column 4 - Warning: unknown attribute "onfocus"

"stdin" appears to be XHTML 1.0 Strict
1 warnings/errors were found!

Same false warning for  form element input elements like textarea

Excluding option optgroup legend and fieldset, from my reading of the strict
dtd the other form elements can have an onfocus attribute.


<!-- attributes for elements that can get the focus
  accesskey   accessibility key character
  tabindex    position in tabbing order
  onfocus     the element got the focus
  onblur      the element lost the focus
-->
<!ENTITY % focus
 "accesskey   %Character;    #IMPLIED
  tabindex    %Number;       #IMPLIED
  onfocus     %Script;       #IMPLIED
  onblur      %Script;       #IMPLIED"
  >

Received on Wednesday, 20 September 2000 20:00:47 UTC