javascript基础知识


Awesome JavaScript

Awesome JavaScript A collection of awesome browser-side JavaScript libraries, resources and shiny things. Awesome JavaScript Package Managers Loaders Testing Frameworks QA Tools MVC Frameworks and Libraries Non-MVC Frameworks Templ …


html5与css交互API《二》

1、JavaScript获取伪元素属性 // Get the color value of .element:before var color = window.getComputedStyle( document.querySelector(‘.element’), ‘:before’ ).getPropertyValue(‘color’); // Get the content value of .element:before var …


JavaScript常用脚本集锦4

一些元素位置设置的通用方法 /** * 查找元素的左端位置, * 代码依赖:getStyle来自 https://gist.github.com/hehongwei44/9abf63536accd0f2eeb7 * */ function posX(elem) { return parseInt(getStyle(elem, “left”)); } /** * 查找元素的顶端 …


数组 – Javascript语法基础 – Javascript核心

原文: http://pij.robinqu.me/JavaScript_Core/JavaScript_Basics/Array.html 源代码: https://github.com/RobinQu/Programing-In-Javascript/blob/master/chapters/JavaScript_Core/JavaScript_Basics/Array.md 本文有缺陷,需要修订和改进 本 …


JavaScript 常用方法总结

转自 攻城狮-JavaScript 常用方法总结 手机类型判断 var BrowserInfo = { userAgent: navigator.userAgent.toLowerCase() isAndroid: Boolean(navigator.userAgent.match(/android/ig)), isIphone: Boolean(navigator.userAgent.match(/iph …



JavaScript常用脚本集锦3

通过数组,拓展字符串拼接容易导致性能的问题 function StringBuffer() { this.__strings__ = new Array(); } StringBuffer.prototype.append = function (str) { this.__strings__.push(str); return this; } StringBuffer.prototype.toStr …