how value after updating text area in javascript?
document.getelementbyid("txtarea").innerhtml
doest give updated value.
<p> <textarea style="width:270px;height:100px" id='txtdata' rows='3' cols='80'></textarea> </p> <p> <button type=button style="width:270px;height:40px" onclick="getvalue();" id='btnget'>get</button> </p> <script type="text/javascript"> function getvalue () { alert(document.getelementbyid("txtdata").innerhtml); } </script>
thanks in advance.
document.getelementbyid("txtarea").value; //value of textarea
Comments
Post a Comment