I have a Javascript function 
show()
{
alert("hello");
}
which runs on ASP Button OnClick Event.
When I click the button of alert message box showing "hello", postback occurs. Is there any way I cant开发者_如何学Python prevent this postback?
Try:
return false;
Yes, you can do show(); return false; in the button's onclick handler.
onclick="show();return false;"
it's very simple: insert aber the "Alert('msg');" a "return false;".
so:
function show()
{
alert('Hallo');
return false;
 }
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论