`

object.toSource()

阅读更多

alert("myObject is " + myObject.toSource());

 

先看看上面这个句子,做什么用呢?在js中我们经常去alert一个对象时,会弹出object,而事实上我们更想看这个对象包含的内容.比如我从server收到一个json对象,我想看看这个json对象的内容,如果我直接alert,没有什么用.

这个时候,上面这个句子就太伟大了.懂了把...

 

我仅在FF下测试,有人说在safari和chrome不能用,我没有试.

 

 

分享到:
评论

相关推荐

    Javascript.Object.Oriented.Programming.pdf

    With a fair understanding of interfaces, multiple inheritance, and composition, you will move on to refactor existing code and to organize your source for easy maintenance and extension. The third ...

    正则表达式

    正则表达式中的特殊字符 字符 含意 \ 做为转意,即通常在"\"后面的字符不按原来意义解释,如/b/匹配字符"b",当b前面加了反斜杆后/\b/,转意为匹配一个单词的边界。 -或- 对正则表达式功能字符的还原,如"*"匹配它...

    EhLib 6.3 Build 6.3.176 Russian version. Full source included.

    Ability to scale grid to fit it to page width. Ability to print/preview title for grid. Ability to print/preview page header and page footer where you can specify macros for current page, current...

    js代码-Object.assign

    Object.assign(target, source1, source2); ``` 在这个例子中,`target`对象将拥有`source1`和`source2`的所有可枚举属性。结果将是: ```javascript // { a: 1, b: 2 } ``` **重要特性:** 1. **浅拷贝**:`...

    Springer.The.Developer’s.Guide.to.Debugging.2008.pdf

    3 Getting to the Root – Source Code Debuggers . . . . . . 23 3.1 Visualizing Program Behavior . . . . . . . . 23 3.2 Prepare a Simple Predictable Example . . . . . . . 24 3.3 Get the Debugger to Run...

    ASP中Adodb.Stream 组件的使用说明

    Object.CopyTo(destStream,[CharNumber]) 其中,destStream 指向要复制的对像,CharNumber 为可选参数,指要复制的字节数,不选为全部复制。 4. Flush 方法 Flush 方法用来刷新对像的缓冲区。其使用方法如下: ...

    FastReport.v4.9.81 for.Delphi.BCB.Full.Source企业版含ClientServer中文修正版

    ability to put an external object inside cross-tab AddWidth, AddHeight properties to increase width&height of the cell AutoSize property, ability to resize cells manually line object can have ...

    XLSReadWriteII.v.5.20.67.D7.D2010-XE10.rar

    With the formatting interface, you can format cells through a cell object. Fast and efficient support when you have any questi ons. No runtime fees for the component. Full source code included. We ...

    Debugging with GDB --2007年

    Stepping to the next line in the source program . . . . . . . . . . . . Stepping into a subroutine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Examining the Stack . . . . . . . . . ....

    keil warring 警告处理

    Note: source file ‘…\Core\Src\gpio.c’ - object file renamed from ‘7.710.200C\gpio.o’ to ‘7.710.200C\gpio_1.o’. 报错 解决方案 1、删除重复文件,确保.c文件在工程内不重复 2、关闭KEIL工程,并运行...

    RComponent.DataObject

    It provides a simple and flexible way to map objects to relational database. RComponent.DataObject handles all types of relations,automatic transaction management, Automatically updates the database ...

    Berg.Next.Suite.v5.8.09.1.Full.Source

    NextInspector is a powerful and completely new Object Inspector component with classic style (normal style) and enhanced style where Vista/XP themes are fully supported! It is v... * overview * *...

    FastReport.v4.8.36 for.Delphi.BCB.Full.Source中文修正版

    Full source codes in the report generator, which allows you to thoroughly understand the work logic and to make any necessary changes and minor adjustments. Enterprise Edition This edition goes ...

    delphi data object

    Using too many data aware components would be lower the database performanceand hard to build the business object layer.This components set includes multiple loose database connection engine....

    Debugging with GDB --2001年5.3

    Contributors to GDB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1 A Sample GDB Session . . . . . . . . . . . . . . . . . . . . 7 2 Getting In and Out of GDB . ....

Global site tag (gtag.js) - Google Analytics