Why onclientclick do a postback?
I have an asp button with no onclick event but only onclientclick. Th开发者_运维知识库is call a javascript function in a iframe in which a video is playing;
each time I click the javascript function is called but also the video restart which means the page is reloaded.
How to prevent this ?
return false from your onclientclick.
OnClientClick="LoadVideo();return false;"
add
return false;
to you function.
精彩评论