Hello
I'm studying a strange behavior in Google Chrome when using jQuery text function:
$(document).ready(function () {
$("#btnSubmit").click(function () {
var t = $('#txtMessage').text();
alert(t); //this shows nothing in Google Chrome, but works in IE9
});
});
when I change var t = $('#txtMessage').text();
to var t = $('#txtMessage').val();
it works in Chrome.
So, what's wrong with text() function?
PS: txtMessage is a textarea