Вот пример:
<!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-US" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>test</title>
</head>
<body>
<form name="up_form">
<form id="test_form" method="post" enctype="multipart/form-data">
<input type="hidden" name="method" value="saveImg"/>
</form>
</form>
<input type="button" onClick="alert(document.getElementById('test_form'))"/>
</body>
</html>
Почему этот код не работает? =(