Stopping onclick from firing when onclientclick is false?

前端 未结 5 850
我在风中等你
我在风中等你 2020-11-30 10:45

Is it possible to use the onclientclick property of a button to do a clientside check. If the check returns true, then fire the onclick

5条回答
  •  执念已碎
    2020-11-30 11:43

    You want to add return inside OnClientClick after a function is called. Otherwise, the button will post back even if function returns false.

    
    
    
    

提交回复
热议问题