![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
JavaScript
基础知识与实践经验结合,打造完整JavaScript工作流,提供工程化编码能力和思维能力。
Mobile-AI
这个作者很懒,什么都没留下…
展开
-
JavaScript使用技巧汇总
计算百分比function toPercent() { Number.prototype.toPercent = function(){ return (Math.round(this * 10000)/100).toFixed(2) + '%'; }}原创 2018-06-13 11:18:49 · 397 阅读 · 0 评论 -
JavaScrip中this、call方法、apply方法、bind方法总结
在Javascript中this总是指向调用它所在方法的对象。因为this是在函数运行时,自动生成的一个内部对象,只能在函数内部使用。1.全局的函数调用function showFullName() { this.firstName = "Lily" this.lastName = "Jams" console.log(this.firstName + " " ...原创 2018-06-13 17:43:34 · 238 阅读 · 0 评论