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

App下載
首頁javascripttext_inputJavascript Form - 如何處理TextArea on change事件

Javascript Form - 如何處理TextArea on change事件

我們想知道如何處理TextArea on change事件。


<html>
<head>
<script type="text/javascript" language="javascript">
function DisplayValue(){
    if(document.MyForm.MyTextField.value!==""){
        console.log("The value entered was \n" + document.MyForm.MyTextField.value);
    }
    else{
        console.log("The text field was empty!\nPlease enter your name.");
    }
}
</script>
</head>
<body>
    <form name="MyForm" action="" method="Post" onsubmit="DisplayValue()">
        <input type="text" name="MyTextField"/><P>Enter your name</p>
        <input type="submit" value="Click to Submit"/>
    </form>
</body>
</html>