0
나는이 간단한 코드를 가지고 : 그것은 작동하지 않습니다양식 콘텐츠를 호출 할 수없는 이유는 무엇입니까?
<html>
<body>
<form name="f1">
<asp:Label name="lbl" runat="server" Text="Label" onclick="lblClick()"></asp:Label>
</form>
<script type="text/javascript">
function lblClick(){
document.f1.lbl.text="new text";}
</script>
</body>
</html>
를, 그것은 나를 제공 : 마이크로 소프트의 JScript 런타임 오류 : 'document.getElementById를 (...)'null의 경우, 또는하지 개체 ... , 레이블 텍스트를 변경할 수 없다 ... 왜? !!!
무엇이 elem ...입니까? – jjj
이것은 함수를 호출 한 레이블에 대한 참조입니다. – rahul