Passing ASP.NET client IDs in to a javascript function

后端 未结 3 672
北荒
北荒 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条回答
  •  遥遥无期
    2020-12-21 05:37

    You could either change the asp.net control to standard html element (i.e., without runat="server")

    
    
    

    or see this Stack Overflow answer:

    problem assigning declarative values in asp:hyperlink. error: this is not scriptlet. will output as plain text

    or use jquery

    
    
        
    

提交回复
热议问题