Fork me on GitHub
  1. JS中toFixed的坑

    重点:toFixed不是四舍五入

    MDN:

    toFixed() 方法使用定点表示法来格式化一个数。

    Chrome:

    console.log((0.005).toFixed(2)) -> 0.01
    console.log((0.015).toFixed(2)) -> 0.01
    console.log((0.025).toFixed(2)) -> 0.03
    console.log((0.035 …
    read more

    There are comments.

  2. 前端的不可见字符

    https://stackoverflow.com/questions/11598786/how-to-replace-non-printable-unicode-characters-javascript

    most of which are quite printable

    https://blog.csdn.net/ranjio_z/article/details/51993040?utm_source=blogxgwz8

    http://www.unicode.org/charts/PDF/U2000.pdf

    unicode 显示符号
    \u2000  
    \u2001
    \u2002
    \u2003
    \u2004
    \u2005
    \u2006
    \u2007
    \u2008
    \u2009
    \u200a
    \u200b
    \u200c
    \u200d
    \u200e …
    read more

    There are comments.

  3. 编写PhoneGapiOS插件一

    PhoneGap安装

    当前版本是PhoneGap2.9.1Xcode6.3

    1. 下载PhoneGap

      官网地址,NodeJS命令安装老是失败,我是直接下载的zip包解压的。 QQ20150421-2@2x

    1. 解压

      解压之后的目录是这样的: QQ20150421-3@2x

    iOS的工程创建

    1. 创建工程(终端命令)

      • 首 …
    read more

    There are comments.

links

social