當前位置:
首頁 >
前端技术
> javascript
>内容正文
javascript
[JSON].typeOf( keyPath )
生活随笔
收集整理的這篇文章主要介紹了
[JSON].typeOf( keyPath )
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
語法:[JSON].typeOf( keyPath )
返回:[String | Number | Boolean | Json | Array | ?Function | 空字符]
說明:獲取指定鍵名值的類型
示例:
Set jsonObj = toJson("{a: 'test', b: 1, c:true, d:[1,2,3,4], e:{a1:2}}")Response.Write "a的類型:"& jsonObj.typeOf("a") & "<br/>" Response.Write "b的類型:"& jsonObj.typeOf("b") & "<br/>" Response.Write "c的類型:"& jsonObj.typeOf("c") & "<br/>" Response.Write "d的類型:"& jsonObj.typeOf("d") & "<br/>" Response.Write "e的類型:"& jsonObj.typeOf("e") & "<br/>"注意:
返回空字符時,可能是未知類型,或者指定鍵名不存在!
更多專業前端知識,請上 【猿2048】www.mk2048.com
總結
以上是生活随笔為你收集整理的[JSON].typeOf( keyPath )的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: h5上传图片及预览
- 下一篇: 【Set jsonObj = toJso