我有一个动态生成的div部分,类名以number结尾。我想从class属性中获取数字 我想要从类caught 1 (1),caught 2 (2)中获取数字,并像在代码片段中那样尝试。我捕获了错误undefined match function.how,以便从类属性中获取数字 $(document).ready(function(){
var num = $('.submission
当试图获取div的类名或ID时,我正在获取TypeError: 'undefined' is not a function (evaluating 'document.getElementByClassName数组/节点列表不是空的,它包含来自每个timeline-item帖子的所有数据,并且只有1有selected类,所以我如何只获得该元素?到目前为止,我的代码如下:
if($.inArray