Question:
I want to get the element whose name attribute is test, but this test is assigned to a variable, such as var name='test'; that is, I want to get the element whose name attribute is the variable name. How to write it in jquery?
Answer:
$("input[name=" name "]")
The questions and answers are very simple. As the saying goes, it’s easy for those who don’t know how to do it. Friends who have the same needs can refer to it for their own reference.