最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Javascript中的var_dump函數(shù)實(shí)現(xiàn)代碼

 更新時(shí)間:2009年09月07日 18:48:32   作者:  
發(fā)現(xiàn)了一個(gè)非常好的JavaScript調(diào)試方法,目前看到的是可以打印Object/Array/Function/String四種類型,使用方法和PHP中的var_dump()一樣,只要直接dump(變量名)即可。
發(fā)現(xiàn)了一個(gè)非常好的JavaScript調(diào)試方法,目前看到的是可以打印Object/Array/Function/String四種類型,使用方法和PHP中的var_dump()一樣,只要直接dump(變量名)即可。

復(fù)制代碼 代碼如下:

dump(value, [showTypes])
@ param value (Any) value to dump
@ param [showTypes] (Boolean) optional to display each key/value's type
@ return (Void) returns nothing


The Dump method is based on one of the tags available in Coldfusion ( <cfdump>) providing the ability to display simple and complex variables in a user friendly way that is perfect for debugging/inspecting data. There is no way to do this with javascript and often I had wanted a method to do this. This method will do just that allowing for an infinite amount of data nesting complete with color coding for different data types, the ability to show/hide the data's type (String/Number/Boolean/Object/Array/Function), expandable and collapsible tables/keys and cross browser support.

Click on the buttons bellow to see some examples in action, toggle the Show Data Types box to see javascript data typing in action (not possible in Coldfusion).

Browser Support
Internet Explorer 6, Internet Explorer 7, Firefox 1.5, Opera 8, Safari 1.2 (Mac), Firefox (Mac) - all tested, should also work in most other browsers

Dump Examples
官方網(wǎng)址
http://www.netgrow.com.au/files/javascript_dump.cfm
相關(guān)文件
http://www.netgrow.com.au/assets/files/dump/dump.zip

以防上面的地址下載不了,腳本之家本地下載地址
http://m.fzitv.net/jiaoben/20804.html

相關(guān)文章

最新評(píng)論

兰西县| 建水县| 南陵县| 织金县| 邳州市| 石城县| 吴旗县| 海口市| 泗阳县| 太湖县| 正安县| 天津市| 玉龙| 绥棱县| 印江| 奎屯市| 新巴尔虎左旗| 金平| 两当县| 平利县| 巴青县| 昭通市| 扎赉特旗| 海宁市| 泾源县| 深圳市| 庄河市| 安龙县| 恩平市| 密山市| 时尚| 九寨沟县| 喜德县| 沁源县| 利津县| 岱山县| 清徐县| 永康市| 文化| 瑞安市| 都江堰市|