Home > front end >  Bosses help have a look
Bosses help have a look

Time:09-22

Effect is drag and drop to below goods, similar to the effect of the cart, why when calculate total amount is shown in NaN, I use pareInt transformation whether doesn't work, or for other reasons, please answer, thank you! (请忽略我的注释)

CodePudding user response:

PareInt=& gt; ParseInt, Number

CodePudding user response:

1/f,
reference jio's reply:
pareInt=& gt; ParseInt, Number

Bosses, can say the detailed point, don't quite understand this statement where or what do you mean, big thanks!

CodePudding user response:

 



`
$(' cart '). InnerHTML +=p
})
}

The function del (index) {
Cart. Splice (index, 1)
The console. The log (cart)
AddCart ()
}

The function sum () {
Var sum=0
Cart. ForEach (item=& gt; {
Sum +=(item. Num * item. Price)
})
$(' sum '). InnerHTML=sum
}
</script>

CodePudding user response:

The
reference 3 floor jio's reply:
 



  • Related