jQuery Dump

码农软件 · 软件分类 · 其他jQuery插件 · 2020-01-09 23:26:59

软件介绍

A attempt to port the php function print_r to javascript and jQuery. It simply returns a nested string containing information about the passed object.

Returns information about:

  • Strings

  • Numbers

  • Booleans

  • Dates

  • Arrays

  • Objects

  • jQuery Objects

  • RegExp

  • Errors

  • DOMElements

  • Functions

Usage:

$.dump( object ):

<pre id="dump"></pre>
<script type="text/javascript">
    $(document).ready(function(){
        var obj = {
            hubba: "Some string...",
            bubba: 12.5,
            dubba: ["One", "Two", "Three"]
        }
        $("#dump").append($.dump(obj));
    });
</script>

Should result in:

Object {
     hubba: "Some string..."
     bubba: 12.5
     dubba: Array (
          0 => "One"
          1 => "Two"
          2 => "Three"
     )
}

$( selection ).dump()

<p>Hubba <span>bubba</span> dubba</p>

<pre id="dump"></pre>
<script type="text/javascript">
    $(document).ready(function(){
        $("#dump").append($("p").dump());
    });
</script>

Should result in:

jQuery Object {
     0 = DOMElement [
          nodeName: P
          nodeValue: null
          innerHTML: [
               0 = String: Hubba
               1 = DOMElement [
                    nodeName: SPAN
                    nodeValue: null
                    innerHTML: [
                         0 = String: bubba
                    ]
               ]
               2 = String: dubba
          ]
     ]
}

本文地址:https://codercto.com/soft/d/23042.html

游戏编程算法与技巧

游戏编程算法与技巧

【美】Sanjay Madhav / 刘瀚阳 / 电子工业出版社 / 2016-10 / 89

《游戏编程算法与技巧》介绍了大量今天在游戏行业中用到的算法与技术。《游戏编程算法与技巧》是为广大熟悉面向对象编程以及基础数据结构的游戏开发者所设计的。作者采用了一种独立于平台框架的方法来展示开发,包括2D 和3D 图形学、物理、人工智能、摄像机等多个方面的技术。《游戏编程算法与技巧》中内容几乎兼容所有游戏,无论这些游戏采用何种风格、开发语言和框架。 《游戏编程算法与技巧》的每个概念都是用C#......一起来看看 《游戏编程算法与技巧》 这本书的介绍吧!

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具