求解 js出现 WebCalendar.iframe.tableWeek is undefined ,在线等解决~@
js里的
document.write("<iframe id='meizzCalendarIframe' name='meizzCalendarIframe' scrolling='no' frameborder='0' width='100%' height='100%'><table id='tableWeek' name='tableWeek' ></table></iframe>");
var WebCalendar = new WebCalendar();
function WebCalendar() {
this.iframe = window.frames["meizzCalendarIframe"];
this.drag = false;
}
//这句错误,怎么回事,自己找了一些没找到解决方法
WebCalendar.iframe.tableWeek.style.cursor = WebCalendar.drag ? "move" : "default";/
------解决方案--------------------
WebCalendar.meizzCalendarIframe.tableWeek.style.cursor = WebCalendar.drag ? "move" : "default";/
试试
------解决方案--------------------WebCalendar.iframe.tableWeek
tableWeek是iframe下的子元素,这样调用不可