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)文章
地址欄上的一段語(yǔ)句,改變頁(yè)面的風(fēng)格。(教程)
地址欄中的js改變頁(yè)面的風(fēng)格代碼2008-04-04js使用for循環(huán)查詢數(shù)組中是否存在某個(gè)值
IE8不支持indexOf,因此寫(xiě)一個(gè)for循環(huán)來(lái)判斷是否存在,下面是代碼,經(jīng)測(cè)試還不錯(cuò)2014-08-08動(dòng)態(tài)添加刪除表格行的js實(shí)現(xiàn)代碼
本篇文章主要是對(duì)動(dòng)態(tài)添加刪除表格行的js實(shí)現(xiàn)代碼進(jìn)行了介紹,需要的朋友可以過(guò)來(lái)參考下,希望對(duì)大家有所幫助2014-02-02微信小程序 數(shù)據(jù)緩存實(shí)現(xiàn)方法詳解
這篇文章主要介紹了微信小程序 數(shù)據(jù)緩存實(shí)現(xiàn)方法詳解,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下2019-08-08bootstrap-table實(shí)現(xiàn)服務(wù)器分頁(yè)的示例 (spring 后臺(tái))
本篇文章主要介紹了bootstrap-table實(shí)現(xiàn)服務(wù)器分頁(yè)的示例 (spring 后臺(tái)),具有一定的參考價(jià)值,有興趣的可以了解一下2017-09-09Bootstrap Table服務(wù)器分頁(yè)與在線編輯應(yīng)用總結(jié)
這篇文章主要介紹了Bootstrap Table服務(wù)器分頁(yè)與在線編輯應(yīng)用總結(jié) 的相關(guān)資料,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下2016-08-08JS組件庫(kù)AlloyTouch實(shí)現(xiàn)圖片輪播過(guò)程解析
這篇文章主要介紹了JS組件庫(kù)AlloyTouch實(shí)現(xiàn)圖片輪播組件過(guò)程解析,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下2020-05-05