【问题标题】:jQuery selector regex and getting the expressionjQuery 选择器正则表达式和获取表达式
【发布时间】:2014-08-29 12:30:05
【问题描述】:

我看到了jQuery selector regular expressions 的问题,我正在尝试使用它,但有没有办法获得课程?

我在$(.*class).change(function(){ I need to get the class here })中使用正则表达式

我已经看到了.attr('class'),但我需要获取 div。

【问题讨论】:

  • 恐怕不清楚你在问什么。

标签: jquery regex jquery-selectors


【解决方案1】:

好的,所以在 function(){ } 中使用 $(this) 为您提供已更改的 div,以便您可以应用 .attr('class')

【讨论】:

    猜你喜欢
    • 2010-09-16
    • 1970-01-01
    • 2012-06-12
    • 2012-05-14
    • 1970-01-01
    • 2012-03-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多