Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
对于 rel 中的 1 个参数,我使用:
<a rel="all">All</a> var group = $(this).attr('rel');
如何从链接中提取多个 rel 属性?
<a rel="all test1 test2">All</a>
天呐!
var groups = group.split( ' ' );
看这个测试。
或者,如果您想考虑它们之间可能出现的重复空格字符
var groups = group.split( /\s+/ );