In one of the company while giving interview as a PHP Developer.
He asked me, How to pass variable in jQuery without using name attribute , id and class??
Yes, you can mention the element itself.
For example:
<p>This is a paragraph</p>
$("p").text("Test message"); // This will select all p tags.
Your interviewer wanted to know about attribute selectors from you:
Example:
$( "input[value='Foo Bar']" ) //select the input which value is 'Foo Bar'