php - #Jquery : is it possible to pass input value without using id,class,name? -


in 1 of company while giving interview php developer.

he asked me, how pass variable in jquery without using name attribute , id , class??

yes, can mention element itself.

for example:

<p>this paragraph</p>  $("p").text("test message");  // select p tags. 

Comments

Popular posts from this blog

javascript - Feed FileReader from server side files -

java - How to create your own button and Use it with Scene Builder for javafx -

c++ - Drawing a circle in directx 9 -