I am trying this code, however i get the error above:
<input id="content" class="content" name="item[content]" type="text" />
var name = $('input[item[content]]');
alert(name);
Basically what i want is get the content of the input. What is the correct syntax ?
Thanks
Use the attribute selector, which has the follwing format:
[attribute_name="value"]to select the desired element. Then, use the.val()method to get the value of it: