LoginSignup
0
2

More than 1 year has passed since last update.

javascriptによる価格フォームの記述から手数料と販売利益の算出方法その3

Last updated at Posted at 2021-07-03

前回の入力時に発火するイベントの記述、valueの取得から販売手数料の計算と計算結果の表示を記述しました。

販売手数料の計算
image.png

. innerHTMLメソッドで表示用のhtmlを作成させた
・価格を取得したpriceInputを引用し計算した
・小数点を切り下げるMath.floorメソッドを使用

販売履歴の計算
image.png
・価格 - 手数料という計算においてddTaxDはhtmlごと使用されるので使えないので計算用のtaxValue作成

image.png

出来た...!!

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2