国产chinesehdxxxx野外,国产av无码专区亚洲av琪琪,播放男人添女人下边视频,成人国产精品一区二区免费看,chinese丰满人妻videos

App下載
首頁javascriptformJavascript Form - 如何從表單對象的元素數(shù)組訪問表單元素

Javascript Form - 如何從表單對象的元素數(shù)組訪問表單元素

我們想知道如何從表單對象的元素數(shù)組訪問表單元素。


<html>
    <body>
    <script language="JavaScript">
    function getName(){
         var textName = document.form1.elements[0].name;
         console.log("The textbox name is: " + textName);
    }
    </script>
    <form name="form1">
    This is a blank input textbox. Click on the button below to get the name of the textbox.
    <br>
    <input type="text" name="textbox1" size=25>
    <br><br>
    <input type="button" value="Get Name" onClick = getName()>
    </form>
    </body>
</html>