<body>   
    <%--
    This example uses JSTL, uncomment the taglib directive above.
    To test, display the page like this: index.jsp?sayHello=true&name=Murphy
    --%>
    <%--
    <c:if test="${param.sayHello}">
        <!-- Let's welcome the user ${param.name} -->
        Hello ${param.name}!
    </c:if>
    --%>
    <form action="" method="post">
    <%for(int i=0;i<10;i++){%>
    <input type="text" name="<%=i%>" value="">
    <%}%>
    <input type="button" value="click" onclick="test();">
    <input type="text" name="a" value="aaaa">
    </form>
        <script language="javascript">
            test=function()
            {
                alert(document.getElementsByName("1")[0].value);
            }
            
        </script>
    </body>