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??
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.