을 ASP.NET에서이 JQuery와 함수를 호출 싶어 : 그것은 인라인이 아닌 경우
var doRedirect = function() { location.href='http://www.example.com' };
$("#<%=button1.ClientId%>").click(function() {
$("#<%=label1.ClientId%>").show();
window.setTimeout("$('#<%=label1.ClientId%>').fadeOut('slow', doRedirect)", 10000);
});
을 (즉,) 파일에, 당신은 ID와 div
에 그들을 배치하고 div
통해 그들을 선택 예를 들어, 당신은 다른 방법으로 사용하려는 클라이언트 제어 아이디의를 얻을해야합니다
<div id="myId">
<asp:Label runat="server" id="label1" />
<asp:Button runat="server" id="button1" />
</div>
var doRedirect = function() { location.href='http://www.example.com' };
$("#myId input").click(function() {
$("#myId span").show();
window.setTimeout("$('#myId span').fadeOut('slow', doRedirect)", 10000);
});
출력 HTML 요소 유형을 jQuery 선택자의 하위 항목으로 사용하고 있습니다.
in. 당신은 그것을 속성으로 바로 부를 수 있습니까 ?? – kobe