Alphabetic list of functions supported by Online Function Graffiti 10 October 2011 Jeff JavaScript, Math 数学 Go to Online Function Graffiti Function Name Remark abs absolute value Inputing examples: y = abs(x); y ... [More]
Mathematics functions that look like human faces 03 October 2011 Jeff Math 数学, JavaScript The mathematics functions can be divided into these categories: Linear Functions Polynomials Power Functions Rational Functions Algebraic Functions Trigonometric Functions Expone... [More]
给JavaScript的String对象添加一个trim()方法 10 September 2011 Jeff JavaScript 一、问题 在对字符串的处理中,去掉有效字符两边的空白字符是一个经常性的需求。于是很多语言中都有专门做这件事的字符串处理函数trim(),如在VB中,你可以使用 Trim(“ 叽歪 ") 得到 “叽歪"。 在 JavaScript 中,String ... [More]
清除JavaScript 数组的所有元素 23 August 2011 Jeff JavaScript 如何清除JavaScript数组中的所有元素呢? 使用Array类的splice()方法: 代码示例: var a = [1, 3, 3, 4, 5, 6]; alert(a.toString()); a.splice(0, a.length); alert(a.toString()); 点击这里运行
JavaScript 版 StringBuffer 类 02 August 2011 Jeff JavaScript 本文介绍了大量字符串拼接操作潜在的问题,以及解决方法。并提供了一个JavaScript版本的StringBuffer类。 [More]
给JavaScript的String对象添加一个format方法 02 August 2011 Jeff JavaScript 本文给JavaScript的String对象添加了一个format()方法,使得在JavaScript中也能像在C#中一样使用 String.format("Current Page Index: {0}, Total Pages: {1}", 10, 150)这样的语句了。 [More]
获取浏览器客户端的左上角坐标与宽高的JavaScript函数 23 December 2010 Jeff JavaScript function getClientLeft() { // Get the left position of the browser client window return typeof self.pageXOffset != "undefined" ? self.pageXOffset : document.documen... [More]