js进行类型判断 Object.prototype.toString.call()

这篇文章主要讲解 js进行类型判断 Object.prototype.toString.call()

首先看一段ECMA中对Object.prototype.toString的解释:
Object.prototype.toString( )
When the toString method is called, the following steps are taken:

  1. Get the [[Class]] property of this object.
  2. Compute a string value by concatenating the three strings “[object “, Result (1), and “]”.
  3. Return Result (2)

    查看更多

UEditor1.3.6图片上传

项目中使用的UEditor是1.3.6版本

ueditor目录结构

最新的版本上传的东西都封装到jar包了,自定义很困难。

  1. 首先下载UEditor
  2. 解压缩UEditor,会看到一下目录:

查看更多

js Bigdecimal

本文讲解如何在javascript中进行高精度的数学计算

学过java的同学应该都知道,java中有一个BigDecimal 是专门用来算金额的,今天这里的BigDecimal是从java翻译成js的。

查看更多

spring mvc test by mock

本文主要介绍spring mvc mock测试

我们在写spring mvc controller时,一般情况下都是在浏览器测试
但是有时候,我们写的controller提供的是api接口,这时我们该怎么测试呢?
这时spring mvc给我们提供了一个很好的测试方法,mock test

多的不说了,直接看代码:

查看更多