Home>Article>Web Front-end> The difference between $("#") and $("#"+xx) in jquery
The following article will introduce to you the difference between $("#") and $("#" xx) in jquery. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.
Related recommendations: "jQuery Video Tutorial"
$("#") refers to selection The selector selects an element with an id, such asYou can use $("#id").val() to get the corresponding data value. If there is a plus sign in it, there is usually a variable. When encapsulating the function Commonly used, for example: the following small demo
The + here is just a connection function. Generally speaking, it is the selector of jquery. There is no difference.
For more programming-related knowledge, please visit :Programming Teaching! !
The above is the detailed content of The difference between $("#") and $("#"+xx) in jquery. For more information, please follow other related articles on the PHP Chinese website!