jgyhuzhou 写道 BlackBird, G. Scott Olson开发的javascript日志记录库,相当于java中的log4j, javascript开发者再也不用使用alert来调试啦。 以下是具体的操作说明: Html代码 复制代码 代码如下: <html> <head> <script type="text/javascript" src="/PATH/TO/blackbird.js"></script> <link type="text/css" rel="Stylesheet" href="/PATH/TO/blackbird.css" /> ... </head> </html> <html> <head> <script type="text/javascript" src="/PATH/TO/blackbird.js"></script> <link type="text/css" rel="Stylesheet" href="/PATH/TO/blackbird.css" /> ... </head> </html> Blackbird有一个简单的方法将返回值发送到控制台: Javascript代码 复制代码 代码如下: log.debug( 'this is a debug message' ); log.info( 'this is an info message' ); log.warn( 'this is a warning message' ); log.error( 'this is an error message' ); log.debug( 'this is a debug message' ); log.info( 'this is an info message' ); log.warn( 'this is a warning message' ); log.error( 'this is an error message' ); 这个方法的好处是,所有这些公共的方法都能独立的现实数据。可以很容易的确定发送邮件的类型: 支持下面的浏览器: * Internet Explorer 6+ * Firefox 2+ * Safari 2+ * Opera 9.5 另外,如果你使用的是YUI的话,可以考虑YUI中的Logger组件 官方地址 http://www.gscottolson.com/blackbirdjs/
推荐阅读
图片上传之前检查大小、尺寸、格式并预览的js代码
下面的代码,需要保存到本地种执行,在线看不到实际效果。
validate before upload by Lance Zhang
File type :gif,jpg,jpeg,png,bmp
File Size limit:
K
Image Height Limit:
Imag>>>详细阅读
本文标题:使用新的消息弹出框blackbirdjs
地址:http://www.17bianji.com/kaifa2/JS/29303.html
1/2 1