retrieve ID of server control using jQuery

前端 未结 6 1258

How do I get the ID of a server control with jQuery?

E.g. I have

a

6条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-11 05:43

    Are you using master page. If yes give ContentPlaceHolderID along with control id.

    Eg:

     jQuery("#ContentPlaceHolderID_ControlId").val;
       jQuery("#body_label1").text;
    

    You can see this in Viewsource

提交回复
热议问题