Passing ASP.NET client IDs in to a javascript function

后端 未结 3 669
北荒
北荒 2020-12-21 05:06

I need to pass a client ID to a Javascript function in the onblur event of an ASP.net control event like this:

OnBlur=\"javascript:setBackground(this, \'<         


        
3条回答
  •  -上瘾入骨i
    2020-12-21 05:45

    Is this from the code-behind?

    How about OnBlur=String.Format("javascript:setBackground(this, '{0}')", txtClientName.ClientID);

提交回复
热议问题