freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

js權(quán)威指南第四版學(xué)習(xí)筆記(參考版)

2024-08-25 09:35本頁面
  

【正文】 onchange. 下面是例子代碼: form name=everything !— 一個(gè)包含所有元素的表單 ... table border=border cellpadding=5 ! in a big HTML table tr tdUsername:br[1]input type=text name=username size=15/td tdPassword:br[2]input type=password name=password size=15/td td rowspan=4Input Events[3]br textarea name=textarea rows=20 cols=28/textarea/td td rowspan=4 align=center valign=center [9]input type=button value=Clear name=clearbuttonbr [10]input type=submit name=submitbutton value=Submitbr [11]input type=reset name=resetbutton value=Reset/td/tr tr td colspan=2 Filename: [4]input type=file name=file size=15/td/tr tr tdMy Computer Peripherals:br [5]input type=checkbox name=extras value=burnerDVD Writerbr [5]input type=checkbox name=extras value=printerPrinterbr [5]input type=checkbox name=extras value=cardCard Reader/td tdMy Web Browser:br [6]input type=radio name=browser value=ffFirefoxbr [6]input type=radio name=browser value=ieInter Explorerbr [6]input type=radio name=browser value=otherOther/td/tr tr tdMy Hobbies:[7]br select multiple=multiple name=hobbies size=4 option value=programmingHacking JavaScript option value=surfingSurfing the Web option value=caffeineDrinking Coffee option value=annoyingAnnoying my Friends /select/td td align=center valign=centerMy Favorite Color:br[8] select name=color option value=redRed option value=greenGreen option value=blueBlue option value=whiteWhite option value=violetViolet option value=peachPeach /select/td/tr /table /form div align=center !— 另一個(gè)表,上表的關(guān)鍵 table border=4 bgcolor=pink cellspacing=1 cellpadding=4 tr td align=centerbForm Elements/b/td td[1] Text/td td[2] Password/td td[3] Textarea/td td[4] FileU/td td[5] Checkbox/td/tr tr td[6] Radio/td td[7] Select (list)/td td[8] Select (menu)/td td[9] Button/td td[10] Submit/td td[11] Reset/td/tr /table /div script // 這個(gè)通用的函數(shù)把一個(gè)事件的細(xì)節(jié)添加到 上面表單的 textarea 區(qū)域。 onclick. Text input type=text text 單行文本輸入框 。 onchange. Select select multiple selectmultiple 列表 ,可選擇多個(gè)選項(xiàng) 。 onclick. Reset input type=reset or button type=reset reset 表單重置按紐 。沒有事件處理程序 Option option none 下拉框 select 對象HTML form elements 對象 HTML 標(biāo)記 type 屬性 描述和事件 的一個(gè)項(xiàng),事件處理程序?qū)儆?select. Password input type=password password 密碼類型,不可見 。 onclick. File input type=file file 用于上傳文件名的輸入框 。 HTML form elements 對象 HTML 標(biāo)記 type 屬性 描述和事件 Button input type=button or button type=button button 按紐 。 定義表單元素( Defining Form Elements) 下面例子把常見的表單元素列舉出來。 與 Form 的 submit() and reset()對應(yīng)的 JS方法 , onsubmit 和 onreset。這個(gè)數(shù)組的 元素的也是按照它們在文檔中出現(xiàn)順序,舉例,引用當(dāng)前文檔的第二個(gè)表單的第三個(gè)元素。在這個(gè)數(shù)組中,F(xiàn)rom 對象是按照他們在數(shù)組中出現(xiàn)的順序存放的。 } 錨 Document 對象的數(shù)組 anchors[]包含了代表 HTML 文檔中已命名位置的 Anchor 對象,這些位置都是由標(biāo)記 a和他的性質(zhì) name所標(biāo)記。 (?/abr‘)。i++) { (?a href=‘+[i].href+‘‘)。 For(var i=0。 舉例:列出文檔中所有鏈接的列表。 使用 src 屬性的圖象置換方法 a href=‖‖ onmouseover=‖=‘images/‘‖ Onmouseout=‖=‘images/‘‖ Img name=‖helpimages‖ src=‖images/‖ width=20 height=20 /a Image 對象的世間處理程序 對應(yīng)于 onload,當(dāng)圖象被完全裝載后程序就會(huì)被調(diào)用。 (Hello, + username + Wele to my blog!)。.../form In JavaScript, instead of using a string of JavaScript code that invokes a function and returns its result, simply assign the function directly to the eventhandler property like this: = validateform。 其他舉例: form name=shipping ... input type=text name=zipcode ... /form You can refer to the text input field element of this form with an intuitive syntax: Document 對象和事件處理程序 在 HTML 中,通過 Javascript 代碼賦予一個(gè)事件處理程序性質(zhì)可以定義事件處理程序。例如: form name=‖f1‖ …………………… .. /form 引用: [0]。 除了這些數(shù)組外,如果與 form,image 對象對應(yīng)的 HTML中 設(shè)定了 name 性質(zhì),則可以用這些名字來引用對象。 用 Image()構(gòu)造函數(shù)能產(chǎn)生一個(gè)屏外圖像,強(qiáng)迫瀏覽器裝載圖像,其 onload 事件處理程序能在圖片裝載后馬上執(zhí)行。 … ()。創(chuàng)建新文檔的標(biāo)準(zhǔn)格式為: ()。 embeds[]代表文檔中的 Link 對象數(shù)組,由 HTML 的 embed或 object嵌入在文檔的非Applet 對象組成。 images 圖片對象組成的數(shù)組,數(shù)組中的每一個(gè)元素 對應(yīng)于網(wǎng)頁中的每一個(gè) IMG 標(biāo)記,數(shù)組元素對應(yīng)的順序是在 HTML 文件代碼中標(biāo)記出現(xiàn)的先后順序; anchors[]代表文檔中的 Link 對象數(shù)組,由 HTML 的 a定義。 每個(gè)窗口還有一個(gè) parent 屬性 ,為包含這個(gè)窗口的 window 對象 ,這樣一個(gè)窗口通過諸如[1]的方式 ,引用他的兄弟窗口 對于頂層窗口 ,有 parent==window 對于框架中的框架 ,可以用 top 直接引用最頂層 的窗口 窗口和框架的名字 框架可以用 name指定名字 ,這個(gè)名字可以為鏈接的 target值 .當(dāng)這個(gè)鏈接被激活的時(shí)候會(huì)在指定的框架中顯示內(nèi)容 在 javascript 也可以通過名字訪問框架 ,如一個(gè)框架如下 frame name=table_of_contents src= 則可以通過 方法訪問該框架 需要注意的在一個(gè)框架定義的函數(shù) /變量 ,在另一個(gè)框架中要通過框架名來調(diào)用 第十四章 Document對象 關(guān)鍵方法: Close(),open(),write(),writeln()。 history 對象 history 屬性可看成是代表歷史 URL 的一個(gè)特殊數(shù)組,它的可讀 length 屬性表明數(shù)組的長度 腳本不能真正訪問 History 數(shù)組 ,但是可以調(diào)用它的函數(shù) * back() 后退 * forward() 前進(jìn) * go() 后退 /前進(jìn)指定的頁數(shù) 多窗 口和多框架 一個(gè)窗口中的任何框架都可以使用屬性 frames、 parent 和 top引用窗口中的其它框架。 它還有各個(gè)屬性如下 * 用的協(xié)議 ,如在本地直接打開網(wǎng)頁則是 file: * 用的域名 * 域名后的網(wǎng)址路徑 .如 /F:/Javascript/example/ * 查詢的內(nèi)容 * () 刷新當(dāng)前線 * () 跳轉(zhuǎn)到指定的 URL,與直接給 location 賦值不同的是 ,這樣不會(huì)在瀏覽歷史中留下記錄 (也就是后退不會(huì)到該頁 ) 可以將一個(gè)新 的 URL 字符串賦值給窗口的 location 屬性。對其賦值使瀏覽器裝載新的 URL(用 Back 按鈕能回退到原頁面)。 移動(dòng)窗口 /改變大小 moveTo 把窗口左上角移到指定的坐標(biāo) * moveTo 把窗口相對現(xiàn)在的位置移動(dòng)指定的象素 * resizeTo 按照絕對大小調(diào)整窗口 * resizeBy 按照相對大小調(diào)整窗口 焦點(diǎn)控制 focus 和 blur focus() 將焦點(diǎn)給指定窗口 ,同時(shí)把窗口移動(dòng)到最前端 ,使窗口可見 ,當(dāng) open()打開窗口 ,如果第二個(gè)參數(shù)指定的窗口名已經(jīng)存在 ,open 不會(huì)自動(dòng)使那個(gè)窗口可見 ,這時(shí)就要調(diào)用該函數(shù) blur() 放棄焦點(diǎn) ,這時(shí)窗口將被至于窗口隊(duì)列的最后 。 opener 屬性是打開自己的那個(gè)窗口,若是用戶手動(dòng)打開,這位 null。 fullscreen= { yes/no/1/0 } 是否全屏,默認(rèn) no channelmode= { yes/no/1/0 } 是否顯示頻道欄,默認(rèn) no toolbar= { yes/no/1/0 } 是否顯示工具條,默認(rèn) no location= { yes/no/1/0 } 是否顯示地址欄,默認(rèn) no directories = { yes/no/1/0 } 是否顯示轉(zhuǎn)向按鈕,默認(rèn) no status= { y
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1