javascript溫習(xí)的一些筆記 基礎(chǔ)常用知識(shí)小結(jié)
更新時(shí)間:2011年06月22日 00:00:55 作者:
在電腦上找到多年前的javascript的一些小筆記,因?yàn)橐獙⒐P記本上面的文件整理一下, 不用的刪除掉, 所以將此篇筆記再發(fā)布一下,存檔到自己的博客吧, 電腦上的文件就刪除了
以下是全部?jī)?nèi)容:
2010.11.29日
1.[window.]alert();
document.alinkColor
textString.anchor()
navigator.appCodeName
escape("Hi!") 返回ascii 碼
eval("x+y") 對(duì)字符串求值 x=10,y=20;eval=30
formName.elementName.focus(); 設(shè)置元素成為焦點(diǎn)
history.forward() 前進(jìn)瀏覽器
Date相關(guān)的函數(shù)
Date.getDate() 返回 1-31間的日期
Date.getDay() 返回星期幾 周一到周六 0-6 間的數(shù)值
Date.getHours() 返回時(shí) 0-23
Date.getMinutes()
Date.getMonth()
Date.getSeconds()
Date.getTime() 得到時(shí)間截 從1970.1.1到現(xiàn)在的毫秒數(shù)
說(shuō)明
{
}
Date.getTimezoneOffset() 得到客戶機(jī)的時(shí)差 GMT
Date.getYear();
history.go();
document.linkName.hash 返回Url中#后面的字符串, 相同的用法有document.links[0].hash,document.location.hash
document.history 對(duì)象
document.history.forward();
document.history.back();
document.history.go(-1), -2
location.host,linkName.host, linkName.port 返回主機(jī)名和端口
location.hostname
location.href
formName.selectName.options[index].index 返回一個(gè)選擇元素的下標(biāo)
isNaN()檢測(cè)是否為數(shù)字
stringName.italics() 設(shè)置為XIE 體格式
stringName.lastIndexOf(‘o'); 返回一個(gè)字符在字符串串尾開(kāi)始數(shù)的索引下標(biāo)
stringName.link();
事件
onChange=""
onClick=""
onFocus=""
onLoad=""
onMouseOver=""
onSelect=""
onSubmit=""
onUnload="" 退出文檔的時(shí)候
document.open([MIMETYPE])
window.open("url","windows name"[,"windowFeatures"])
Date.parse("Jan 11,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間的隨機(jī)數(shù)
Math.round(argument)四舍五入
formName.resetButtonName
window.status
stringName.strike() 將字符轉(zhuǎn)化成帶刪除線的字
stringNAme.sub() 將字符轉(zhuǎn)化成下標(biāo)文本格式
formName.submit() 執(zhí)行與單擊提交按鈕相同的動(dòng)作
stringName.substring(index1,index2) 取子串
stringName.sup() 轉(zhuǎn)換成上標(biāo)形式
target 規(guī)定一個(gè)窗口名的字符串 formName.target, forms[index].target,location.target,link.target,links[index].target
document.title 返回<title> 標(biāo)簽中的中讀值,沒(méi)包含的話是空NULL
Date.toGMTString() 將一個(gè)日期轉(zhuǎn)換在一個(gè)時(shí)間字符串
stringName.toLowerCase();
stringName.toUppderCase()
window.top, window,top.frameName,window.top.frames[index]最高層的瀏覽器窗口
navigator.userAgent 瀏覽器標(biāo)識(shí)代理
documnet.vlinkColor 返回鏈接訪問(wèn)過(guò)的顏色值
2010.11.29日
1.[window.]alert();
document.alinkColor
textString.anchor()
navigator.appCodeName
escape("Hi!") 返回ascii 碼
eval("x+y") 對(duì)字符串求值 x=10,y=20;eval=30
formName.elementName.focus(); 設(shè)置元素成為焦點(diǎn)
history.forward() 前進(jìn)瀏覽器
Date相關(guān)的函數(shù)
Date.getDate() 返回 1-31間的日期
Date.getDay() 返回星期幾 周一到周六 0-6 間的數(shù)值
Date.getHours() 返回時(shí) 0-23
Date.getMinutes()
Date.getMonth()
Date.getSeconds()
Date.getTime() 得到時(shí)間截 從1970.1.1到現(xiàn)在的毫秒數(shù)
說(shuō)明
{
}
Date.getTimezoneOffset() 得到客戶機(jī)的時(shí)差 GMT
Date.getYear();
history.go();
document.linkName.hash 返回Url中#后面的字符串, 相同的用法有document.links[0].hash,document.location.hash
document.history 對(duì)象
document.history.forward();
document.history.back();
document.history.go(-1), -2
location.host,linkName.host, linkName.port 返回主機(jī)名和端口
location.hostname
location.href
formName.selectName.options[index].index 返回一個(gè)選擇元素的下標(biāo)
isNaN()檢測(cè)是否為數(shù)字
stringName.italics() 設(shè)置為XIE 體格式
stringName.lastIndexOf(‘o'); 返回一個(gè)字符在字符串串尾開(kāi)始數(shù)的索引下標(biāo)
stringName.link();
事件
onChange=""
onClick=""
onFocus=""
onLoad=""
onMouseOver=""
onSelect=""
onSubmit=""
onUnload="" 退出文檔的時(shí)候
document.open([MIMETYPE])
window.open("url","windows name"[,"windowFeatures"])
Date.parse("Jan 11,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間的隨機(jī)數(shù)
Math.round(argument)四舍五入
formName.resetButtonName
window.status
stringName.strike() 將字符轉(zhuǎn)化成帶刪除線的字
stringNAme.sub() 將字符轉(zhuǎn)化成下標(biāo)文本格式
formName.submit() 執(zhí)行與單擊提交按鈕相同的動(dòng)作
stringName.substring(index1,index2) 取子串
stringName.sup() 轉(zhuǎn)換成上標(biāo)形式
target 規(guī)定一個(gè)窗口名的字符串 formName.target, forms[index].target,location.target,link.target,links[index].target
document.title 返回<title> 標(biāo)簽中的中讀值,沒(méi)包含的話是空NULL
Date.toGMTString() 將一個(gè)日期轉(zhuǎn)換在一個(gè)時(shí)間字符串
stringName.toLowerCase();
stringName.toUppderCase()
window.top, window,top.frameName,window.top.frames[index]最高層的瀏覽器窗口
navigator.userAgent 瀏覽器標(biāo)識(shí)代理
documnet.vlinkColor 返回鏈接訪問(wèn)過(guò)的顏色值
相關(guān)文章
Extjs顯示從數(shù)據(jù)庫(kù)取出時(shí)間轉(zhuǎn)換JSON后的出現(xiàn)問(wèn)題
后臺(tái)從數(shù)據(jù)庫(kù)取出時(shí)間,JSON格式化后再傳到gridpanel,這時(shí)時(shí)間變成了:/Date(32331121223)/這樣的格式,本文將詳細(xì)介紹解決Extjs顯示從數(shù)據(jù)庫(kù)取出時(shí)間轉(zhuǎn)換JSON后的出現(xiàn)問(wèn)題2012-11-11
JS獲取月的最后一天與JS得到一個(gè)月份最大天數(shù)的實(shí)例代碼
本篇文章主要是對(duì)JS獲取月的最后一天與JS得到一個(gè)月份最大天數(shù)的實(shí)例代碼進(jìn)行了介紹,需要的朋友可以過(guò)來(lái)參考下,希望對(duì)大家有所幫助2013-12-12
JavaScript中transform實(shí)現(xiàn)數(shù)字翻頁(yè)效果
本文主要介紹JavaScript中利用transform實(shí)現(xiàn)數(shù)字翻頁(yè)效果的實(shí)例,具有很好的參考價(jià)值。下面跟著小編一起來(lái)看下吧2017-03-03
js判斷文件類型大小并給出提示的實(shí)現(xiàn)方法
下面小編就為大家分享一篇js判斷文件類型大小并給出提示的實(shí)現(xiàn)方法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧2018-01-01

