C#Button在体内调用Facebook Javascript [英] C# Button calls Facebook Javascript in the body
问题描述
我的facebook javascript将起作用,如果我使用html超链接onclick =postSomething()
但是如何在我的LinkButton中调用这个postsomething()函数?
< asp:LinkButton ID =LinkButton1runat =server OnClientClick =postSomething()> LinkButton
点击此链接按钮后,我正在尝试会话文本输出。< br $>
感谢您的帮助!
您的,
Aaron
Hi,
My facebook javascript will work if i uses html hyperlink onclick="postSomething()
But how can i call this "postsomething()" function in my LinkButton?
<asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="postSomething()">LinkButton
I'm trying to session the Text output once i click this linkbutton.
Thanks for your help!
Yours,
Aaron
推荐答案
你必须如下调用:
You have to call like below :
<asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="return postSomething();">LinkButton</asp:LinkButton>
如需了解更多信息,请查看:
http://stackoverflow.com/questions/1672235/call-javascript-fr om-link-button [ ^ ]
我希望这会对你有所帮助。
For more info check this :
http://stackoverflow.com/questions/1672235/call-javascript-from-link-button[^]
I hope this will help to you.
这篇关于C#Button在体内调用Facebook Javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!