javascript温习的一些笔记基础常用知识小结
2023-06-13 09:14:28 时间
以下是全部内容:
2010.11.29日
1.[window.]alert();
document.alinkColor
textString.anchor()
navigator.appCodeName
escape("Hi!")返回ascii码
eval("x+y")对字符串求值x=10,y=20;eval=30
formName.elementName.focus();设置元素成为焦点
history.forward()前进浏览器
Date相关的函数
Date.getDate()返回1-31间的日期
Date.getDay()返回星期几周一到周六0-6间的数值
Date.getHours()返回时0-23
Date.getMinutes()
Date.getMonth()
Date.getSeconds()
Date.getTime()得到时间截从1970.1.1到现在的毫秒数
说明
{
}
Date.getTimezoneOffset()得到客户机的时差GMT
Date.getYear();
history.go();
document.linkName.hash返回Url中#后面的字符串,相同的用法有document.links[0].hash,document.location.hash
document.history对象
document.history.forward();
document.history.back();
document.history.go(-1),-2
location.host,linkName.host,linkName.port返回主机名和端口
location.hostname
location.href
formName.selectName.options[index].index返回一个选择元素的下标
isNaN()检测是否为数字
stringName.italics()设置为XIE体格式
stringName.lastIndexOf(‘o");返回一个字符在字符串串尾开始数的索引下标
stringName.link();
事件
onChange=""
onClick=""
onFocus=""
onLoad=""
onMouseOver=""
onSelect=""
onSubmit=""
onUnload=""退出文档的时候
document.open([MIMETYPE])
window.open("url","windowsname"[,"windowFeatures"])
Date.parse("Jan11,1996");
parseFloat(string)
parseInt(string[,radox]);
document.fromName.passwordName
location.pathname,link.pathname,links[index].pathname
windowName.prompt(message[inputDefault]);
protocal:
about,ftp,http,mailto,news,file,javascript
Math.random()返回0-1间的随机数
Math.round(argument)四舍五入
formName.resetButtonName
window.status
stringName.strike()将字符转化成带删除线的字
stringNAme.sub()将字符转化成下标文本格式
formName.submit()执行与单击提交按钮相同的动作
stringName.substring(index1,index2)取子串
stringName.sup()转换成上标形式
target规定一个窗口名的字符串formName.target,forms[index].target,location.target,link.target,links[index].target
document.title返回<title>标签中的中读值,没包含的话是空NULL
Date.toGMTString()将一个日期转换在一个时间字符串
stringName.toLowerCase();
stringName.toUppderCase()
window.top,window,top.frameName,window.top.frames[index]最高层的浏览器窗口
navigator.userAgent浏览器标识代理
documnet.vlinkColor返回链接访问过的颜色值
2010.11.29日
1.[window.]alert();
document.alinkColor
textString.anchor()
navigator.appCodeName
escape("Hi!")返回ascii码
eval("x+y")对字符串求值x=10,y=20;eval=30
formName.elementName.focus();设置元素成为焦点
history.forward()前进浏览器
Date相关的函数
Date.getDate()返回1-31间的日期
Date.getDay()返回星期几周一到周六0-6间的数值
Date.getHours()返回时0-23
Date.getMinutes()
Date.getMonth()
Date.getSeconds()
Date.getTime()得到时间截从1970.1.1到现在的毫秒数
说明
{
}
Date.getTimezoneOffset()得到客户机的时差GMT
Date.getYear();
history.go();
document.linkName.hash返回Url中#后面的字符串,相同的用法有document.links[0].hash,document.location.hash
document.history对象
document.history.forward();
document.history.back();
document.history.go(-1),-2
location.host,linkName.host,linkName.port返回主机名和端口
location.hostname
location.href
formName.selectName.options[index].index返回一个选择元素的下标
isNaN()检测是否为数字
stringName.italics()设置为XIE体格式
stringName.lastIndexOf(‘o");返回一个字符在字符串串尾开始数的索引下标
stringName.link();
事件
onChange=""
onClick=""
onFocus=""
onLoad=""
onMouseOver=""
onSelect=""
onSubmit=""
onUnload=""退出文档的时候
document.open([MIMETYPE])
window.open("url","windowsname"[,"windowFeatures"])
Date.parse("Jan11,1996");
parseFloat(string)
parseInt(string[,radox]);
document.fromName.passwordName
location.pathname,link.pathname,links[index].pathname
windowName.prompt(message[inputDefault]);
protocal:
about,ftp,http,mailto,news,file,javascript
Math.random()返回0-1间的随机数
Math.round(argument)四舍五入
formName.resetButtonName
window.status
stringName.strike()将字符转化成带删除线的字
stringNAme.sub()将字符转化成下标文本格式
formName.submit()执行与单击提交按钮相同的动作
stringName.substring(index1,index2)取子串
stringName.sup()转换成上标形式
target规定一个窗口名的字符串formName.target,forms[index].target,location.target,link.target,links[index].target
document.title返回<title>标签中的中读值,没包含的话是空NULL
Date.toGMTString()将一个日期转换在一个时间字符串
stringName.toLowerCase();
stringName.toUppderCase()
window.top,window,top.frameName,window.top.frames[index]最高层的浏览器窗口
navigator.userAgent浏览器标识代理
documnet.vlinkColor返回链接访问过的颜色值
相关文章
- JavaScript 如何将 HTML 转成 Markdown?
- javascript_JavaScript走向成熟
- 百度分享js代码_javascript基础代码
- JavaScript 入门基础 - 对象(五)
- 请你说一说Java 和 JavaScript的区别?
- JavaScript基础详解编程语言
- Javascript基础详解编程语言
- javaScript基础练习题-下拉框制作(CSS)详解编程语言
- 如何在WebForm中使用javascript防止连打(双击)
- 零基础学JavaScript最新动画教程+iso光盘下载
- Javascript更新JavaScript数组的uniq方法
- javascript面向对象编程基础:继承
- javascript语法基础想学习js的朋友可以看看
- javascript设计模式之单体模式面向对象学习基础
- JavaScript类库D
- 基于jQuery架构javascript基础体系
- JavaScript高级程序设计阅读笔记(十六)javascript检测浏览器和操作系统-detect.js
- JavaScript实现url地址自动检测并添加URL链接示例代码
- JavaScript获取鼠标移动时的坐标(兼容IE8、chome谷歌、Firefox)