LinkButton does not invoke on click()

前端 未结 8 905
不思量自难忘°
不思量自难忘° 2020-12-29 08:15

Why doesn\'t this work?

    
    

        
8条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-29 08:44

    The click event handler has to actually perform an action. Try this:

    $(function () {
        $('.myButton').click(function () { alert('Hello!'); });
    });
    

提交回复
热议问题