2018年4月17日

toString() 和 toLocaleString() 的区别

摘要: toString() 和 toLocaleString() 的区别 table th:nth of type(4) { width: 400px; } 区别项 | toString() | toLocaleString() | 结论 | | | new Date() 调用 | Tue Apr 17 阅读全文

posted @ 2018-04-17 12:24 cag2050 阅读(200) 评论(0) 推荐(0)

使用 localeCompare 函数对中文进行排序

摘要: localeCompare 函数可对中文进行排序。 性能相关 当比较大量字符串时, 比如比较大量数组时, 最好创建一个Intl.Collator 对象并使用compare 属性所提供的函数。 mdn介绍:https://developer.mozilla.org/zh CN/docs/Web/Jav 阅读全文

posted @ 2018-04-17 12:22 cag2050 阅读(742) 评论(0) 推荐(0)

导航