简体   繁体   中英

onclick and onclientclick

I have the following line in asp.net

<asp:LinkButton runat="server" ID="createuser" 
    OnClientClick="javascript:$('#dialogform').dialog('open');" 
    onclick="AddCaseInfo_Click">Create Case</asp:LinkButton>

onclientclick works fine, but not onclick. I tried

OnClientClick="javascript:$('#dialogform').dialog('open');return true;"

or

OnClientClick="javascript: return $('#dialogform').dialog('open');"

...but it still doesnt work.

:( Any help please?

您不必指定javascript:return true

OnClientClick="$('#dialogform').dialog('open');"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM