Intente sacarlo asi pero no sale, logro funcionar esa funcion de getElementsByName
Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>
<body>
<form method="post" action="" >
<input type="text" name="caca"/>
<input type="text" name="caca"/>
<input type="button" onclick="morbi ()" value="yo"/>
</form>
<script type="text/javascript">
<!--
function morbi()
{
var caca=document.getElementsByName("caca[0]");
document.write(caca.innerHTML);
}
//-->
</script>
</body>
</html>