I gave the test element an event handler and an attribute I invented myself.
This is the first test element.
It has the following attributes, in this order:
id="test"
align="center"
style="border: 1px solid #0000cc"
onclick="alert('Clicked!')"
ppk="JavaScript"
This is the second test element. It has only one attribute:
id="test2"
Perform these tests in the order they appear in:
z = document.createAttribute('title'); alert(z)
z.value = 'Test title'; alert(z.value)
x.setAttributeNode(z)
Now go over the test element with your mouse, you should see the title 'Test title'.
a
is the h2
at the top of
this page. It has no attributes)