zoukankan      html  css  js  c++  java
  • js内置对象、定时函数、document对象

           1.document对象

                 常用属性:referrer:返回当前载入文档的URL   URL:返回当前文档的URL

                 常用属性语法:document.referrer    document.URL

                 常用方法:getElementByld();   getElementsByName();   getElementByTagName();  write()

                 常用方法语法:document.getElementByld();   document.getElementsByTagName( ); 

                                          document.getElementsByName();  document.write();

           2.js内置对象

                  1.Array对象  2.Date对象  3.正则表达式对象  4.string对象  5.Global对象 

           3.定时函数

                     由于时间一直在变我们在用时分秒的时候就得插入定时函数设置定时唯一秒

                                  setTimeout("调用的函数",等待的毫秒数)

                                  var time = setTimeout("alert('3秒之后弹出')",3000);每3000毫秒弹出一次提示框

                                  setInterval("调用的函数",间隔的毫秒数)

                                   var  MyTime = setInterval("showTime()",1000);每个1000毫秒执行一次函数

  • 相关阅读:
    Hadoop的三大组件 内容
    常用的linux命令
    shell学习心得
    liunx学习心得。
    随机数
    HADOOP框架
    Shell学习心得
    linux学习心得
    jquery解决随机点餐系统重复问题
    在码云上git push时报错,出现error: failed to push some refs to 'https://gitee.com/lipengyangzuishuai/gitstudy.git'的解决办法
  • 原文地址:https://www.cnblogs.com/yangshuwen/p/13154035.html
Copyright © 2011-2022 走看看