Reputation: 49404
I have a div:
<div class="form_result">hello</div>
var mb = $('.form_result').text();
alert("Value of div is: " + mb.value);
The alert is returning Undefined.
Tried JQuery version 1.9.1 and 1.8.3 ...same result.
Upvotes: 0
Views: 95
Reputation: 57095
you don't need .value
alert("Value of div is: " + mb)
.text() get the text inside the div
.value
is used for form
elements like input,select,radio,checkbox
Upvotes: 2