javascript获得当前的信息的一些常用命令
本文内容很简单,给大家总结一下javascript获得当前的信息的一些常用命令
console.info("document.URL=" + document.URL);
console.info("document.location.href=" + document.location.href);
//console.info("document.base=" + document.base); //这是错的!
console.info("document.location=" + document.location);
console.info("self.location.href=" + self.location.href);
console.info("top.location.href=" + top.location.href);
console.info("location.hostname=" + location.hostname);
console.info("window.location.host=" + window.location.host);
console.info("window.location.pathname=" + window.location.pathname);
暂时想起来的就这些啦,后续再更新^_^
浅谈JavaScript Date日期和时间对象
Date日期和时间对象1.介绍Date对象,是操作日期和时间的对象。Date对象对日期和时间的操作只能通过方法。2.构造函数2.1newDate():返回当前的本地日期和
浅谈JavaScript Array对象
Array数组1.介绍数组是值的有序集合。每个值叫做一个元素,而每个元素在数组中有一个位置,以数字表示,称为索引。JavaScript数组是无类型:数组元素
浅谈JavaScript function函数种类
本篇主要介绍普通函数、匿名函数、闭包函数1.普通函数介绍1.1示例functionShowName(name){alert(name);}1.2Js中同名函数的覆盖在Js中函数是没有重载,定义相同