HTML display result in text (input) field?

后端 未结 4 1764
予麋鹿
予麋鹿 2021-01-01 03:08

I have a simple HTML form, with 3 input field, when you hit = button, it suppose to add 2 numbers that you typed in the first 2 input fields and display result in 3rd filed.

4条回答
  •  醉话见心
    2021-01-01 03:59

    With .value and INPUT tag

    
      
        Sum
    
        
      
    
      
        
    +

    with innerHTML and DIV

    
      
        Sum
    
        
      
    
      
        
    +

提交回复
热议问题