.Net 1.1 webapp의 usercontrol에 연결된 외부 JS 파일에 다음 JQuery 코드가 있습니다.로드 중 Jquery 코드가 실행되지 않음
usercontrol은 작업 표입니다.
페이지가로드되면 MonthChange가 호출되어 한 페이지에서 올바르게 작동합니다.
하지만 지금은 timesheet/usercontrol을 새로운 브라우저 창에서 인쇄하기 위해 웹 페이지로로드하려고합니다.
문제는 내 MonthChange가 실행되지 않습니다.
어떤 아이디어가 있습니까 ???
$(function() {
MonthChange();
//TestData();
$('[class^=TSGridTB]').blur(function() {
var day = GetDay($(this).attr('id'));
var date = GetRowDate(day);
var bgcolor = GetInputFieldColor(date, false);
$(this).css("background-color", bgcolor);
$(this).parent().css("background-color", bgcolor);
//CalcHours($(this).get(0));
});
$('[class^=TSGridTB]').focus(function() {
var day = GetDay($(this).attr('id'));
var date = GetRowDate(day);
var bgcolor = GetInputFieldColor(date, true);
$(this).css("background-color", bgcolor);
$(this).parent().css("background-color", bgcolor);
});
$('[id$=lstMonth]').change(function() {
MonthChange();
});
});
오류 로그를 확인 했습니까? –
'$ (document) .ready()'를 사용해야합니다. http://docs.jquery.com/Events/ready – sepehr