- 最後登錄
- 2024-5-6
- 在線時間
- 18713 小時
- 註冊時間
- 2008-8-25
- 閱讀權限
- 95
- 精華
- 0
- UID
- 4843775
- 帖子
- 3831
- 積分
- 698 點
- 潛水值
- 73091 米
|
問題是 購買橘子 自行決定價格
再自已 決定要購買的數量
超過 500元後 打9折 超過1000元後 打7折
要怎麼寫呀 google 一整天了 是漏打什麼字 或符號嗎
var orange = 60 ;
var weight = 10 ;
var total = orange * weight ;
if ( total >= 500){
document.write( parseInt(total * 0.9),'<br>');
}else if ( orange>= 1000 );
document.write( '總共是',parseInt(total * 0.7),'<br>');
}
... |
|