摘要: 直接在ready中调用其他方法,会提示缺少对象的错误,解决方法如下:方法1. 应用jQuery的扩展可以解决这个问题。$(document).ready(function(){$.extend({ show:function(){ alert("ready"); }});setInterval("show()",3000);});方法2. 指定定时执行的函数时不要使用引号和括号。$(function(){function show(){ alert("ready");}setInterval(show,3000);// 注意函数名没有 阅读全文
posted @ 2013-11-09 11:09 茗迹周 阅读(294) 评论(0) 推荐(0) 编辑