<div class="codetitle"> <span><a style="CURSOR: pointer" data="27909" class="copybut" id="copybut27909" onclick="doCopy('code27909')"><u>复制代码</u></a></span>代码如下:</div> <div class="codebody" id="code27909"> <br>var colorValues = new Array(); <br>$('#image-colors').find('.color-block').each(function(){ <br>if($(this).find('span').eq(0) .hasClass('selected')){ <br>colorValues.push($(this).attr('title')); <br>} <br>}); <br>var colorString = colorValues.join(','); <br>アラート(colorString); <br> </div>