SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2012
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What happens if we put "!" charecter before a Javascript function name?

    <asp:Button ID="ButtonAdd" UseSubmitBehavior="true" OnClick="ButtonAddClick" OnClientClick="return !AddClientSide();" Text="Add" runat="server" />

    Thanks

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,508
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    ! is a negation. It means that if AddClientSide() returns true, !AddClientSide() will be false. And if AddClientSide() returns false, !AddClientSide() will be true.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •