File: forms.namedItem.html

package info (click to toggle)
elinks 0.19.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,424 kB
  • sloc: ansic: 174,653; cpp: 31,967; sh: 7,841; python: 4,039; perl: 2,183; javascript: 1,794; pascal: 1,710; makefile: 1,006; yacc: 295; lisp: 125; awk: 79; ruby: 70
file content (60 lines) | stat: -rw-r--r-- 2,169 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<TITLE>forms.namedItem variations</TITLE>
</HEAD>
<BODY>
<FORM name="f" action="#">
<P><BUTTON name="b" type="button">dummy</BUTTON></P>
</FORM>
<SCRIPT type="application/ecmascript">
function stringify(val)
{
	var str = typeof(val);
	var first = true;
	if (str != "object" || val === null) {
		str += " " + val;
	} else {
		str += " {";
		for (var prop in val) {
			if (!first) str += ", ";
			first = false;
			str += prop;
		}
		str += "}";
	}
	return str;
}
</SCRIPT>
<SCRIPT type="application/ecmascript">
// iceweasel 2.0+dfsg-1: object {b, nodeName, nodeValue, nodeType, parentNode, childNodes...
// ELinks 0.11.3: object {action, elements, encoding, length, method, name, target}
window.alert("document.forms.f=" + stringify(document.forms.f));
</SCRIPT>
<SCRIPT type="application/ecmascript">
// iceweasel 2.0+dfsg-1: object {b, nodeName, nodeValue, nodeType, parentNode, childNodes...
// ELinks 0.11.3: object {action, elements, encoding, length, method, name, target}
window.alert("document.forms[\"f\"]=" + stringify(document.forms["f"]));
</SCRIPT>
<SCRIPT type="application/ecmascript">
// iceweasel 2.0+dfsg-1: object {b, nodeName, nodeValue, nodeType, parentNode, childNodes...
// ELinks 0.11.3: TypeError: document.forms.namedItem is not a function
window.alert("document.forms.namedItem(\"f\")=" + stringify(document.forms.namedItem("f")));
</SCRIPT>
<SCRIPT type="application/ecmascript">
// iceweasel 2.0+dfsg-1: undefined undefined
// ELinks 0.11.3: object null
window.alert("document.forms.notfound=" + stringify(document.forms.notfound));
</SCRIPT>
<SCRIPT type="application/ecmascript">
// iceweasel 2.0+dfsg-1: undefined undefined
// ELinks 0.11.3: object null
window.alert("document.forms[\"notfound\"]=" + stringify(document.forms["notfound"]));
</SCRIPT>
<SCRIPT type="application/ecmascript">
// iceweasel 2.0+dfsg-1: object null
// ELinks 0.11.3: TypeError: document.forms.namedItem is not a function
window.alert("document.forms.namedItem(\"notfound\")=" + stringify(document.forms.namedItem("notfound")));
</SCRIPT>
</BODY>
</HTML>