i looking for a way to preview the text while im typing in a textarea in jquery
exactly what u are using for Stackoverflow ,
The <textarea> tag allows the user to input text over multiple rows. Following example demonstrates the use of text and textarea input in the jQuery Mobile. Save the above html code as textinput_text.html file in your server root folder.
jQuery text() Method jQuery HTML/CSS Methods. Example. ... Definition and Usage. The text() method sets or returns the text content of the selected elements. When this method is used to return content, it returns the text content of all matched elements (HTML markup will be removed).
Definition and Usage. The text() method sets or returns the text content of the selected elements. When this method is used to return content, it returns the text content of all matched elements (HTML markup will be removed). When this method is used to set content, it overwrites the content of ALL matched elements.
$ ("p").text("Hello world!"); The text () method sets or returns the text content of the selected elements. When this method is used to return content, it returns the text content of all matched elements (HTML markup will be removed).
<script>
$(document).ready(function () {
$('#someTextBox').keyup(function(){
$('#target').html($(this).val());
});
});
</script>
<textarea id="someTextBox"></textarea>
<div id="target"></div>
As you type text in the <textarea>
, the text should be duplicated in the HTML of the <div>
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With