jQuery equivalent to “getElementsByName”

后端 未结 5 642
一生所求
一生所求 2020-12-25 14:07

What is the correct jquery syntax for a getElementsByName call?

Here is my javascript code:

var test = document.getElementsByName(tableN         


        
5条回答
  •  时光说笑
    2020-12-25 15:05

    Remove the index from the first statement

    These are equal.

    var test = document.getElementsByName(tableName);
    var test = $("[name=tableName]");
    

提交回复
热议问题