YAOHAIXIAO.COM

Focus on front end technoloy

YLogger v1.1.0 Beta程序演示Demo

程序简介

YLogger v1.1.0 Beta,这个小程序也是大概是两年前写的,在Messagebox模拟提示框效果后写的,就是为了方便开发AJAX程序的调试用的。在页面中直接加载Logger跟踪框,免去了使用alert()方法在循环时不停点击的烦恼。今天花了点时间也用YaoUI重新写了下,但是还是没有做任何的优化。不过已经可以适应一般的调试提示信息了。当然绝对没有firebug或者firebug lite那么牛,但是也算是自己开发工具的一个初步的尝试吧。

调用方法

第一步:在页面中调用yao.js文件,例如:

<script type="text/javascript" src="js/yao.js"></script>

第二步:编写调用代码:


/*
 * 在需要调试的地方加入相应的log信息就可以了
 * info/msg - 普通信息
 * accept - 正确信息
 * warn - 警告信息
 * error - 错误信息
 */
(function(){
    YAO.Logger.log('The window, strings and functions also have', 'info', 'http://www.yaohaixiao.com/js/core.js');
    YAO.Logger.log('The window, strings and functions also have', 'accept', 'http://www.yaohaixiao.com/js/core.js');
    YAO.Logger.log('The window, strings and functions also have', 'warn', 'http://www.yaohaixiao.com/js/core.js');
    YAO.Logger.log('The window, strings and functions also have', 'error', 'http://www.yaohaixiao.com/js/core.js');
    YAO.Logger.log('The window, strings and functions also have', 'msg', 'http://www.yaohaixiao.com/js/core.js');
    YAO.Logger.log('The window, strings and functions also have', 'info', 'http://www.yaohaixiao.com/js/core.js');
    YAO.Logger.log('The window, strings and functions also have', 'accept', 'http://www.yaohaixiao.com/js/core.js');
    YAO.Logger.log('The window, strings and functions also have', 'warn', 'http://www.yaohaixiao.com/js/core.js');
    YAO.Logger.log('The window, strings and functions also have', 'error', 'http://www.yaohaixiao.com/js/core.js');
    YAO.Logger.log('The window, strings and functions also have', 'msg', 'http://www.yaohaixiao.com/js/core.js');
})();
	

程序代码

版权所有 © 2008-2010 yaohaixiao.com, 保留一切权利。    ICP备案:鄂ICP备08000339号