search

Home  >  Q&A  >  body text

javascript - How does HTML automatically calculate that the values ​​of the previous two rows are in the third row?

How to use native js to automatically fill the data in the previous two rows to the third row after calculation? Thanks!

阿神阿神2718 days ago790

reply all(2)I'll reply

  • 三叔

    三叔2017-06-26 10:52:03

    1. If it is angular or react, newer front-end frameworks support two-way binding;

    2. If it is jquery or native js, then you can only operate dom node binding events;

    reply
    0
  • 阿神

    阿神2017-06-26 10:52:03

    For frameworks, ng or vue, you only need to bind a value to the above two, and the third one is equal to the sum of the first two!

    If it is native js or jquery, bind blur or change events to the first and second text boxes! When the event is triggered, the values ​​of the first two text boxes are calculated and assigned to the third one!

    reply
    0
  • Cancelreply