Calling Javascript from a html form

后端 未结 6 474
眼角桃花
眼角桃花 2021-01-30 06:18

I am basing my question and example on Jason\'s answer in this question

I am trying to avoid using an eventListener, and just to call handleClick

6条回答
  •  不要未来只要你来
    2021-01-30 06:54

    Everything seems to be perfect in your code except the fact that handleClick() isn't working because this function lacks a parameter in its function call invocation(but the function definition within has an argument which makes a function mismatch to occur).

    The following is a sample working code for calculating all semester's total marks and corresponding grade. It demonstrates the use of a JavaScript function(call) within a html file and also solves the problem you are facing.

    
    
    
         Semester Results 
    
    
        

    Semester Marks


    Semester 1:

    Semester 2:

    Semester 3:

    Semester 4:

    Semester 5:

    Semester 6:


提交回复
热议问题