Using an HTML button to call a JavaScript function

前端 未结 10 1643
我在风中等你
我在风中等你 2020-11-22 09:59

I am trying to use an HTML button to call a JavaScript function.

Here\'s the code:



        
10条回答
  •  没有蜡笔的小新
    2020-11-22 10:17

    This looks correct. I guess you defined your function either with a different name or in a context which isn't visible to the button. Please add some code

提交回复
热议问题