Check the generated html (source code) to check if the generated for label has the same Id.
(检查生成的html(源代码)以检查生成的for标签是否具有相同的ID。)
The Id for the label is the server side Id, not client side.(标签的ID是服务器端ID,而不是客户端。)
That's the reason why the javascript does not find the element.(这就是javascript无法找到该元素的原因。)
Add the ClientId property to your label control (ClientId="l") and check again.
(将ClientId属性添加到标签控件(ClientId =“ l”),然后再次检查。)
Greetings
(问候)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…