select 框option添加属性 js计算价格 保持两位小数
<select name="" id="">
<volist name="v['childList']" id="n" key="k">
<option value="{pigcms:$n['id']}" price={pigcms:$n['price']} <if condition='$k eq 1'>selected</if>>{pigcms:$n['server']}</option>
</volist>
</select>
function jisuan(){
var zongjia=0.00;
$('.money option[selected]').each(function(){
zongjia+=parseFloat($(this).attr('price'));
});
$('.dd3 font').text('¥'+zongjia.toFixed(2));
}