开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜