在线手册

  • jsref statements

    JavaScript Statements Reference « Previous Next Reference » JavaScript Statements In HTML, JavaScript statements are "instructions" to be "executed" by the web browser. This statement tells the ...

  • jsref gettime

    ... var minutes=1000*60; var hours=minutes*60; var days=hours*24; var years=days*365; var d=new Date(); var t=d.getTime(); var y=Math.round(t/years); y 输出结果: var minutes=1000*60; var hours=minutes*60; var days=hours*24; var years=days*365; var d ...

  • jsref parse

    ← JavaScript setDate() 方法 JavaScript getUTCSeconds() 方法 → JavaScript parse() 方法 JavaScript Date 对象 实例 返回1970/01/01至2012/3/21之间的毫秒数: var d = Date.parse("March 21, 2012"); d 输出结果: document.write(Date.parse("March 21, 2012")); 尝试一下 » ...

  • jsref tutorial

    ... 置的JavaScript对象 所有浏览器对象 所有HTML DOM对象 JavaScript Objects 参考手册 参考手册描述了每个对象的属性和方法,并提供了在线实例。 Array 对象 Boolean 对象 Date 对象 Math 对象 Number 对象 String 对象 RegExp 对象 全局属性和函数 Browser Objects 参考手册 参考手册描述了每个对象的属性和方法,并提供了在线实例。 Window 对象 Navigator 对象 ...

  • canvas globalcompositeoperation

    HTML canvas globalCompositeOperation Property Canvas Object Example Draw rectangles using two different globalCompositeOperation values. Red rectangles are destination images. Blue rectangles are source images: source-over ...

  • jsref function

    ... : 1.0 More Examples Example Return the value of PI: function myFunction() {    return Math.PI;} The result will be: 3.141592653589793 Try it yourself » Example Return the product of a ...

  • jsref map

    ... function myFunction() {    x = document.getElementById("demo")    x.innerHTML = numbers.map(Math.sqrt);} The result will be: 2,3,4,5 Try it yourself » More "Try it Yourself" examples below ...

  • jsref operators

    ... age" in person         // Returns true// Predefined objects"PI" in Math            // Returns true"NaN" in Number   ...

  • jsref reduce

    ... ;var numbers = [15.5, 2.3, 1.1, 4.7];function getSum(total, num) {    return total + Math.round(num);}function myFunction(item) {    document.getElementById("demo").innerHTML = numbers.reduce(getSum,0 ...

  • jsref return

    ... Statement JavaScript Statements Reference Example Return the value of PI: function myFunction() {    return Math.PI;} The result will be: 3.141592653589793 Try it yourself » More "Try it Yourself" examples ...

推广服务(新)
最新文章