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

RESTful Web Services Cookbook

RESTful Web Services Cookbook

Subbu Allamaraju / Yahoo Press / 2010-3-11 / USD 39.99

While the REST design philosophy has captured the imagination of web and enterprise developers alike, using this approach to develop real web services is no picnic. This cookbook includes more than 10......一起来看看 《RESTful Web Services Cookbook》 这本书的介绍吧!

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

URL 编码/解码
URL 编码/解码

URL 编码/解码

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

HEX CMYK 互转工具