A question


#1

$(document).ready(function() {
$('button').click(function() {
var toAdd = $("input[name=message]").val();
$('#messages').append("

"+toAdd+"

");
});
});
Can anybody explain what does "input[name=message]" mean? Thanks.

#2

This is an input element selector where the name attribute value is "message".

<input name="message">

#3

Ok, thanks.:slight_smile:


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.