当我从asp:button onclick事件调用
JavaScript函数时,我收到此错误消息
HTML
<asp:Button ID="btnFromCalOpen" runat="server" Text=" > " onclick="ShowCal()" CssClass = "SElementHide" />
使用Javascript
function ShowCal() { var elem = document.getElementById('MainContent_CalendarFrom'); if (elem.visibility = "hidden" ) { elema.style.visibility = "visible"; elema.style.display = "block"; } else { elema.style.visibility = "hidden"; elema.style.display = "none"; } }
错误
编译器错误消息:BC30456:’ShowCal’不是’ASP.default_aspx’的成员.
请帮忙