<span class="simpleCart_grandTotal"></span>
<script type="text/javascript">
function totall(){
var sum = parseInt(simpleCart_grandTotal.value);
if(parseInt(sum.value))
totall += parseFloat(sum) *20;
});
$('#totall').text( +totall); }
</script>
<div class="totall"></div>
我希望simpleCart_grandTotal类值乘以20,结果变成div类。
答案 0 :(得分:0)
<span class="simpleCart_grandTotal"></span>
<script type="text/javascript">
function totall(){
var sum = $('.vote-count-post').text()
if(Number($('.vote-count-post').text()) == $('.vote-count-post').text())
$('.totall').text( Number(sum) + Number($('.totall').text()) )
});}
</script>
<div class="totall"></div>