亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

使用新的消息彈出框blackbirdjs

 更新時(shí)間:2008年10月16日 23:32:14   作者:  
Blackbird 是一個(gè)開源的JavaScript庫,提供了一種簡單的記錄日志的方式和一個(gè)控制臺(tái)窗口,有了這個(gè)之后,你就可以拋棄alert() 了。
jgyhuzhou 寫道
BlackBird, G. Scott Olson開發(fā)的javascript日志記錄庫,相當(dāng)于java中的log4j, javascript開發(fā)者再也不用使用alert來調(diào)試?yán)病?
以下是具體的操作說明:
Html代碼
復(fù)制代碼 代碼如下:

<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有一個(gè)簡單的方法將返回值發(fā)送到控制臺(tái):
Javascript代碼
復(fù)制代碼 代碼如下:

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' );

這個(gè)方法的好處是,所有這些公共的方法都能獨(dú)立的現(xiàn)實(shí)數(shù)據(jù)??梢院苋菀椎拇_定發(fā)送郵件的類型:

支持下面的瀏覽器:
* Internet Explorer 6+
* Firefox 2+
* Safari 2+
* Opera 9.5
另外,如果你使用的是YUI的話,可以考慮YUI中的Logger組件
官方地址 http://www.gscottolson.com/blackbirdjs/

相關(guān)文章

最新評(píng)論