1 调试代码,不喜欢alert,但是为了兼容性问题处理,IE下不可以使用consloe,所以,写个统一的扩展吧。更多更能,慢慢扩展了。
var j=jQuery.noConflict(); j.fn.log = function (msg) { msg = !msg ? 'no_msg_passed' : msg; if(jQuery.browser.msie){ alert(msg + '\n' + this.parent().html()); } else { console.log("%s: %o", msg, this); } return this; }; j('body').log();
2 太晚了……