Saved X
Google login
SignUp with Email
X

Jquery get textarea value

theindreshverma ( Edited  Sep 29, 06:03 pm )
Login

Jquery val() method, get input,textarea value.

<html>
<head>
    <title>Jquery get textarea value</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<body>

<h1>Jquery get textarea value</h1>

<textarea placeholder="Enter here" id="t"></textarea>

<button id="b">Get textarea value</button>

<script>
$('#b').click(function() {
    var x = $('#t').val();
    
    alert(x);
});
</script>

</body>
</html>

Sourcecode Tags

More Sourcecodes

More Sourcecodes