text = $("input:checkbox[name='cat_id']:checked").map(function (index, elem) {
return $(elem).val();
}).get().join(',');
alert("选中的checkbox的值为:" + text);
<span> <input type="checkbox" value="28" name="cat_id">网络推广</span>
<span> <input type="checkbox" value="29" name="cat_id">网络投票</span>
<span> <input type="checkbox" value="30" name="cat_id">网络营销</span>
<span> <input type="checkbox" value="31" name="cat_id">SEO优化</span>
<span> <input type="checkbox" value="32" name="cat_id">外包推广</span>
<span> <input type="checkbox" value="33" name="cat_id">微信推广</span>
<span> <input type="checkbox" value="34" name="cat_id">QQ推广</span>
<span> <input type="checkbox" value="35" name="cat_id">店铺推广</span>
<span> <input type="checkbox" value="36" name="cat_id">广告投放推广</span>
<span> <input type="checkbox" value="37" name="cat_id">文案策划</span>
<span> <input type="checkbox" value="38" name="cat_id">设计</span>
<span> <input type="checkbox" value="39" name="cat_id">图片后期</span>
<span> <input type="checkbox" value="40" name="cat_id">起名取名</span>
<span> <input type="checkbox" value="41" name="cat_id">翻译</span>
<span> <input type="checkbox" value="42" name="cat_id">游戏</span>