javascript的js操作css

一.基本语法
   var,if,switch,for,while,do while,break,isNaN,parseInt,parseFloat

二.Dom模型
   window
         (setInterval(设置定时器),clearInterval(清除定时器),alert,confirm(弹出对话框),parent(window的父元素),opener,window.open(打开新窗口并装入给定 URL 的文档。)
 ,window.showModalDialog(创建一个显示指定 HTML 文档的模式对话框。),window.frames[](获取给定文档定义或与给定窗口关联的文档定义的所有 window 对象的集合。))
   history
        .go(1)//往前前进一步
 .go(-1)//往后后退一步
 .back()//后退
 .forward()//前进
   document
        .write(123)
 .getElementById("");
 .getElementsByName("");
 .getElementsByTagName("");
 .body
   location
        ="";
 .href="";
 .replace("")
 .reload();

   status="";
   navigator
         .appName

三.核心类
   String
     .substring(2)
     .substring(2,4)
     .substr(3,5);
     .indexOf('@')
     .charAt(3)
     .replace("","")
     .length

   Date
     var d1 = new Date();
     var d2 = new Date("yyyy/MM/dd");
     .getTime();
     .getYear();
     .getGetFullYear();
     .getMonth();
     .getDate();
     .getDay();
     .getHours();
     .getMinutes();
     .getSeconds();
     .getMilliSeconds();


   Math
      .PI
      .math()
      .round()
   Array
      .length


四.css
   行内样式 <div style="">
   选择器
       a) id选择器
       b) 类选择器
       c) 标签选择器
   外部样式

   js操作样式
       找对象.style.属性=样式值;
       document.getElementById("mydiv").style.color="red";

       document.body.clientWidth 肉眼看到的
       document.body.scrollWidth 滚动条的


五.表单
   验证
   事件

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值