基于安全考虑,小程序中不支持动态执行 JS 代码,即:

微信小程序已经支持了绝大部分的 ES6 API,已支持的 API 如下(部分API依赖系统版本):
| String | iOS8 | iOS9 | iOS10+ | Android |
|---|---|---|---|---|
| codePointAt | ||||
| normalize | ||||
| includes | ||||
| startsWith | ||||
| endsWith | ||||
| repeat | ||||
| String.fromCodePoint |
| Array | iOS8 | iOS9 | iOS10+ | Android |
|---|---|---|---|---|
| copyWithin | ||||
| find | ||||
| findIndex | ||||
| fill | ||||
| entries | ||||
| keys | ||||
| values | ||||
| includes | ||||
| Array.from | ||||
| Array.of |
| Number | iOS8 | iOS9 | iOS10+ | Android |
|---|---|---|---|---|
| isFinite | ||||
| isNaN | ||||
| parseInt | ||||
| parseFloat | ||||
| isInteger | ||||
| EPSILON | ||||
| isSafeInteger |
| Math | iOS8 | iOS9 | iOS10+ | Android |
|---|---|---|---|---|
| trunc | ||||
| sign | ||||
| cbrt | ||||
| clz32 | ||||
| imul | ||||
| fround | ||||
| hypot | ||||
| expm1 | ||||
| log1p | ||||
| log10 | ||||
| log2 | ||||
| sinh | ||||
| cosh | ||||
| tanh | ||||
| asinh | ||||
| acosh | ||||
| atanh |
| Object | iOS8 | iOS9 | iOS10+ | Android |
|---|---|---|---|---|
| is | ||||
| assign | ||||
| getOwnPropertyDescriptor | ||||
| keys | ||||
| getOwnPropertyNames | ||||
| getOwnPropertySymbols |
| Other | iOS8 | iOS9 | iOS10+ | Android |
|---|---|---|---|---|
| Symbol | ||||
| Set | ||||
| Map | ||||
| Proxy | ||||
| Reflect | ||||
| Promise |
当前题目:创新互联小程序教程:微信小程序 JavaScript支持情况
网页路径:http://www.csdahua.cn/qtweb/news35/459485.html
网站建设、网络推广公司-快上网,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 快上网