前端面試江湖

前端面試江湖

《前端面試江湖》是2016年5月電子工業出版社出版的圖書,作者是李紅米。

內容簡介

《前端面試江湖》融合了Web前端面試題和主流開發技術,涵蓋了JavaScript、HTML5+CSS3、DIV+ CSS、jQuery等幾大前端主流技術,結構清晰,層次明了。從知識點來說,基本上覆蓋了近幾年這個行業都會涉及的前端面試題;從實戰經驗來說,可以提高讀者獨立思考的能力,增加讀者的實際套用技能。另外,《前端面試江湖》的王牌“17助力”,更能助讀者在面試中的一臂之力。走進《前端面試江湖》不再為面試而苦惱!

《前端面試江湖》適合從事前端工作或即將從事前端工作的讀者閱讀。

編輯推薦

資深Web前端工程師解答重要知識點

近900道試題涵蓋前端方向最新的主流技術

內容提要

《前端面試江湖》融合了Web前端面試題和主流開發技術,涵蓋了JavaScript、HTML5+CSS3、DIV+ CSS、jQuery等幾大前端主流技術,結構清晰,層次明了。從知識點來說,基本上覆蓋了近幾年這個行業都會涉及的前端面試題;從實戰經驗來說,可以提高讀者獨立思考的能力,增加讀者的實際套用技能。另外,《前端面試江湖》的王牌“17助力”,更能助讀者在面試中的一臂之力。走進《前端面試江湖》不再為面試而苦惱!

《前端面試江湖》適合從事前端工作或即將從事前端工作的讀者閱讀。

目錄

第1 篇 烽煙起,劍在手——JavaScript 永不休

第1 章 未入江湖,先定三分[JavaScript 初級面試題]······································ 2

1.1 面試從這裡開始(關於JavaScript) ··························································· 2

1.2 這題很簡單(字元串) ················································································ 3

1.3 我面試,我快樂(變數) ············································································ 5

1.4 平平淡淡搞定面試(數據類型) ································································ 7

1.5 哎呦,這題不錯喔(window 的屬性和方法) ··········································· 8

1.6 讓你魂牽夢繞的題(元素) ······································································ 12

1.7 “神馬”題都是浮雲(className) ··························································· 15

1.8 看完這題,花兒都笑了(保留字和關鍵字) ·········································· 15

1.9 我懂的題,你懂嗎(循環語句) ······························································ 16

第2 章 能文能武,身懷絕技[JavaScript 中級面試題] ······························· 17

2.1 小考題,大味道(表達式) ······································································ 17

2.2 讓人嘆為觀止的考題(String 對象) ························································ 18

2.3 讓人絞盡腦汁的考題(Math 對象) ························································· 21

2.4 令人陶醉的考題(數組) ·········································································· 23

2.5 令人難過的考題(函式) ·········································································· 34

2.6 令人抑鬱的考題(對象) ·········································································· 40

2.7 夜以繼日難以攻克的考題(定時器) ······················································ 50

2.8 學無止境(日期和時間) ·········································································· 52

2.9 主流技術的“最愛”(typeof、instanceof) ·············································· 54

第3 章 進得武林,入得四方[JavaScript 高級面試題] ······························· 56

3.1 輕鬆解決纏繞你的考題(this) ································································· 56

3.2 細心可以拿滿分的題(事件) ·································································· 58

3.3 不可忽視的小漏洞(表單、文本框) ······················································ 68

3.4 “照鏡子”看題(對稱數) ········································································ 77

3.5 讓你堅定不移看下去(JavaScript 客戶端檢測) ····································· 77

3.6 過了這題,公司隨便挑(排序) ······························································ 78

3.7 看了這題,收穫多多(call、apply) ························································ 79

3.8 看懂必高薪的面試題(繼承和多態) ······················································ 80

3.9 大型企業面試必考(CharAt()、indexOf()) ············································ 82

3.10 五年前端,三年必考(substr、substring) ············································ 82

3.11 這題如此而已,我會為你加油(iframe) ·············································· 82

第4 章 一手遮天,大名遠揚[JavaScript 終極面試題] ······························· 84

4.1 讓人暴走的考題(Ajax) ··········································································· 84

4.2 面對這些考題,除了崩潰我不知道還能說什麼( XMLHttpRequest對象)···90

4.3 感慨“時間太瘦”的考題(關於繼承) ·················································· 92

4.4 高級前端必考試題(閉包) ······································································ 97

4.5 值得思考和深鑽的考題(video) ······························································ 99

4.6 這些年,一直“陪伴我”的考題(url 參數) ······································· 100

4.7 小心陷阱!總是被坑的考題(JavaScript 模仿塊級作用域) ··············· 101

4.8 錯誤率最高的考題(正則表達式) ························································ 102

4.9 前端最新技術考題(轉換大寫) ···························································· 103

4.10 總有一種題,叫看起來都對(JSON) ················································· 103

4.11 最難回答的考題(事件委託) ······························································· 107

4.12 高智商考題(事件流) ·········································································· 109

4.13 前端壓軸考題(錯誤處理與調試) ······················································ 115

4.14 你值得擁有的考題(Cookie) ······························································· 115

綜合提升 ··········································································································· 116

第2 篇 駕駿馬,拉長弓——HTML5+CSS3 我獨行

第5 章 博學多才,雄韜偉略[HTML5+CSS3 初級面試題] ······················· 128

5.1 做了這些,不再是菜鳥(關於HTML5) ·············································· 128

5.2 真本事,更自信(HTML5 語法) ·························································· 129

5.3 這些題總能溫暖你(HTML5+CSS3 新增屬性) ··································· 131

5.4 最實用的題(HTML5 與XML) ···························································· 132

5.5 KO 這些題,前端崗位不是夢(HTML5 結構) ··································· 133

5.6 前端好考題(HTML5 布局) ·································································· 134

5.7 這些題,讓你贏在起跑線上(關於CSS3) ·········································· 135

5.8 領先別人一步(CSS3 選擇器) ······························································ 135

5.9 從最陌生到最熟悉的題(切圖) ···························································· 136

5.10 做好當下(定位相關) ·········································································· 136

第6 章 不鳴則已,一鳴驚人[HTML5+CSS3 中級面試題] ······················· 138

6.1 沒有你們,我會不安(HTML5 音頻與視頻) ······································ 138

6.2 終是撥開雲霧見月明(彈性盒布局) ···················································· 139

6.3 心在天上,題在手上(__________HTML5 常見問題) ························ 140

6.4 多幾分鐘的準備,少幾小時的麻煩(HTML 元素) ···························· 140

6.5 經久不衰的考題(代碼糾錯) ································································ 141

6.6 比上不足,比下有餘(代碼最佳化) ························································ 142

6.7 非常可樂,非常選擇(上傳) ································································ 143

6.8 愛上面試的感覺(文本) ········································································ 144

6.9 你想擺譜,先幹掉我(字型) ································································ 146

6.10 前端深處考題(框線背景) ·································································· 147

6.11 有這些,更自信(多列布局) ······························································· 148

6.12 總有些考題念念不忘(多列顯示樣式) ·············································· 149

6.13 深入每道題的世界(盒布局) ······························································ 150

第7 章 運籌帷幄,決勝千里[HTML5+CSS3 高級面試題] ······················· 151

7.1 就這些,永不過期(模式) ···································································· 151

7.2 這些題,讓你前端技藝更高一籌(HTML5 頁面) ······························ 152

7.3 考題中的釘子戶(Canvas 的使用) ························································ 153

7.4 點面試,闖全關(媒體查詢) ································································ 154

7.5 面試一大坎兒(瀏覽器快取與本地儲存) ············································ 154

7.6 這些讓你更強大(媒體調用標籤) ························································ 155

7.7 腦若一動,題就千行(HTML、CSS 綜合) ········································· 156

7.8 有了我就知足吧(兼容問題) ································································ 157

7.9 一直在尋找,直到遇見你(回響式布局) ············································ 157

7.10 一直在尋覓的考題(關於瀏覽器) ······················································ 158

7.11 無法輕描淡寫的考題(PC、移動) ······················································ 159

7.12 最難懂的題給真心的你(HTML5 效果) ············································ 160

7.13 從此,面試不重來(控制項相關) ·························································· 161

第8 章 見多識廣,獨霸一方[HTML5+CSS3 終極面試題] ···················· 163

8.1 這些題必須認真對待(HTML5 應用程式快取) ·································· 163

8.2 這些題“包羅萬象”(HTML5 常見API) ············································· 164

8.3 再深的題海,也能乘風破浪(HTML5 數據存儲) ······························ 164

8.4 這些題讓你相信能,就能!(HTML5 編輯API) ······························· 165

8.5 搞清楚這些讓你“屌炸天”(CSS 動畫) ·············································· 165

8.6 前端面試獨家寶貝(cache 機制) ·························································· 167

8.7 前端大牛的看家本事(workers 多線處理) ··········································· 168

8.8 一入考題深似海,從此面試是浮雲(Geolocation 地理位置) ············ 169

8.9 前端大“蝦”必考題(編碼問題) ························································ 170

綜合提升 ··········································································································· 170

第3 篇 箭在弦,不回頭——DIV+CSS 向前沖

第9 章 夯實基礎,厚積薄發[DIV+CSS 初級面試題] ······························· 180

9.1 有一種題叫邊做邊流淚(浮動) ···························································· 180

9.2 想登上理想的高峰嗎?那就來吧(塊級元素) ···································· 182

9.3 時間很短,面試趕緊(行內元素) ························································ 182

9.4 面試就像半杯水,你能看到什麼(CSS 圖片) ···································· 183

9.5 面試是一場旅行,正在進行時(CSS 引入) ········································ 184

9.6 面對考題不曾退縮(CSS 概述) ···························································· 184

9.7 面試者就像蒲公英,看似自由,卻身不由己(CSS 選擇器) ············ 186

9.8 絕地逢生之“路”(CSS 規範) ······························································ 187

9.9 能磨鍊薄弱意志的考題(HTML 結構) ················································ 188

9.10 看的越少,失去的越多(隱藏DOM 元素) ······································· 190

9.11 喜歡前進,看的題就越來越多(CSS 文字樣式) ······························ 191

第10 章 百折不撓,歷經磨難[DIV+CSS 中級面試題] ····························· 192

10.1 有一種題做起來很崩潰(inline-block 特性) ······································ 192

10.2 快到題里來(布局) ·············································································· 192

10.3 思想太滿,就會學不來(CSS 屬性) ·················································· 193

10.4 面試失敗十次,找第十一次堅持的藉口(清除浮動與閉合浮動) ······193

10.5 多項選擇,任你選擇(CSS 定義標籤) ·············································· 194

10.6 不滿足昨天的難度(簡化CSS 代碼) ················································· 195

10.7 華麗的跌倒,勝過無謂的徘徊(CSS 設定圖片效果) ······················ 196

10.8 緣分是一本書,翻得不經意會錯過(CSS 設定表格) ······················ 197

10.9 不要在錯的題上猶豫不決(背景圖片) ·············································· 197

10.10 面試是一把鎖,你拿對鑰匙了嗎(CSS 與表單) ···························· 198

10.11 有思維才是王牌(CSS 定位) ···························································· 199

10.12 提前進入,囤積自信(DIV 布局) ···················································· 200

10.13 擁有別人沒有的(盒子布局) ···························································· 202

10.14 既然無處可逃,不如帥氣迎接(CSS 排版) ···································· 203

10.15 “限量版”的題(CSS 注釋) ······························································ 204

10.16 值得分享的考題(iframe) ·································································· 205

第11 章 出類拔萃,終成大器[DIV+CSS 高級面試題] ····························· 206

11.1 程式“猿”你懂了嗎(DOCTYPE) ···················································· 206

11.2 面試其實很簡單,就看你了(CSS Hack) ·········································· 207

11.3 別讓面試,輸給了心情(懸浮效果) ··················································· 207

11.4 面試不要瞎忙,不經意的才是最好的(CSS 優先權) ······················ 207

11.5 我不知將去何方,但我已在路上(定位) ··········································· 208

11.6 面試如一道弧線,卻能擺平一切(頁面布局) ··································· 210

11.7 程式設計師,我不知道你心裡是怎么想的(CSS 字型) ·························· 211

11.8 面試時誰沒有耐心,誰就沒有智慧(CSS 表格) ······························ 211

11.9 面試,你緊張了嗎(CSS 內外邊距) ·················································· 212

11.10 不能白看,看完必過(CSS 文本) ···················································· 212

11.11 面試如同千軍萬馬,更是使人心驚膽戰(CSS 連結) ····················· 213

第12 章 爐火純青,大殺四方[DIV+CSS 終極面試題] ····························· 216

12.1 面試就像腳踏車,說得簡單,其實還要靠自己(三層構成) ·········· 216

12.2 面試就算終有一散,也別辜負相遇(CSS Sprites) ··························· 216

12.3 面試短短的話語,卻包含萬千(CSS 中a 的偽類) ··························· 217

12.4 面試要勇敢,前方的路很長(CSS 瀏覽器兼容) ······························ 218

12.5 程式“猿”看完就樂了(CSS 水平對齊) ·········································· 222

12.6 “面試”是一件多么美的事(CSS 浮動) ············································ 222

12.7 面試是不可缺少的美好亮點(CSS 優勢) ·········································· 224

12.8 你可知道面試的重要(IE6 常見問題) ················································ 224

綜合提升 ··········································································································· 226

第4 篇 江湖路,無盡頭——jQuery 任逍遙

第13 章 刻苦學藝,心無旁騖[jQuery 初級面試題] ·································· 232

13.1 要想簡單,那就簡單(選擇器) ·························································· 232

13.2 面試總會有不期而遇的溫暖(屬性) ·················································· 235

13.3 不要為面試而煩惱(綁定事件) ·························································· 237

13.4 不要害怕面試,因為你需要(表單) ·················································· 238

13.5 說多了都是眼淚,還是來點實在的吧(文檔處理) ·························· 239

13.6 最怕的東西,最應該去突破(篩選) ·················································· 239

第14 章 學貫古今,中流砥柱[jQuery 中級面試題] ·································· 240

14.1 你還在“泡”招聘,“奔”面試嗎(DOM 載入) ······························ 240

14.2 你能讓面試官驚呆嗎(移動端事件) ·················································· 240

14.3 面試是一張網,你收穫了嗎(取HTML、文本的值) ······················ 241

14.4 每天超越自己一點點(事件) ······························································ 241

第15 章 出神入化,學貫古今[jQuery 高級面試題] ·································· 243

15.1 做小題,成大事(read、onload 的區別) ············································ 243

15.2 讓憤怒多些實力(效果) ······································································ 243

第16 章 英姿勃發,獨當一面[jQuery 終極面試題] ·································· 246

16.1 困難的考題能讓你看到更多的風景(get 和post) ····························· 246

16.2 想知道你能力的邊界在哪嗎(最佳化) ·················································· 246

16.3 其實成功一直在你的旁邊(Ajax) ······················································· 247

16.4 放手做,勇敢錯(jQuery、DOM 對象) ············································· 248

16.5 斷了退路,才有出路($.getScript() 和$.getJSON()) ························ 251

綜合提升 ··········································································································· 252

第5 篇 清風落,江湖生——「17 助力」泯恩仇

第17 章 萬事俱備,只欠東風[“17 助力”,助你一臂之力] ··········· 258

17.1 “助力1”:瀏覽器和兼容差異 ····························································· 258

17.2 “助力2”:前端最佳化 ············································································· 264

17.3 “助力3”:開發者工具 ········································································· 267

17.4 “助力4”:JS 庫和框架 ········································································· 269

17.5 “助力5”:cookie ··················································································· 276

17.6 “助力6”:超級素數 ············································································· 277

17.7 “助力7”:主流技術 ············································································· 277

17.8 “助力8”:進制轉化 ············································································· 278

17.9 “助力9”:追加字元串 ········································································· 279

17.10 “助力10”:模組模式 ········································································· 279

17.11 “助力11”:效果題 ·············································································· 281

17.12 “助力12”:跨域問題 ········································································· 285

17.13 “助力13”:前端交談 ········································································· 285

17.14 “助力14”:綜合考察 ········································································· 298

17.15 “助力15”:項目問題 ········································································· 298

17.16 “助力16”:Flash ················································································· 302

17.17 “助力17”:邏輯題 ············································································· 303

第6 篇 功成時,把酒笑——綜合測試莫言愁

第18 章 前端開發面試題 ············································································ 310

18.1 前端面試模擬試題一 ············································································ 310

一、技術題 ······································································································· 310

二、效果題 ······································································································· 349

18.2 前端面試模擬試題二 ············································································ 351

第19 章 人資問題 ······················································································· 356__

前言

網際網路技術日新月異。2005年以後,網際網路進入Web 2.0時代,各種類似桌面軟體的Web套用大量湧現,網站的前端由此發生了翻天覆地的變化。網頁不再只是承載單一的文字和圖片,各種豐富媒體讓網頁的內容更加生動,網頁上軟體化的互動形式為用戶提供了更好的使用體驗,這些都是基於前端技術實現的。

Web前端開發是一項很特殊的工作,涵蓋的知識面非常廣,它既有具體的技術,又有抽象的理念。簡單地說,它的主要職能就是把網站的界面更好地呈現給用戶。隨著前端開發涉及的領域愈發的廣泛,各大企業對招聘的Web前端開發工程師崗位提出了更多的需求,對應聘者面試內容的知識面也不斷拓寬,這就使很多應聘者卡在了面試這道坎兒上。

本書系統地劃分了近幾年來Web前端的主流模組和常用的框架、庫等,整理了大量企業面試題,並附有資深前端工程師的詳細講解,獨具特色的筆風讓讀者在學習的同時,也不會覺得枯燥。

為何寫作本書

前端開發是個非常新的職業,對一些規範和最佳實踐的研究都處於探索階段,總有新的靈感和技術不時閃現出來,所以對前端開發工程師的能力要求越來越高。由於前端開發人員的需求越來越大,更多的人願意學前端,做前端,所以前端開發的就業前景越來越廣,競爭也越來越激烈。一位好的Web前端開發工程師在知識體系上既要有深度,又要有廣度,所以很多大公司即使出高薪也很難招聘到理想的前端開發工程師。然而公司對應聘者的初次了解就在面試中,可見這“第一印象”很重要。

為了有效地應對面試,“面經”這個新興概念應運而生。筆者在當初找工作階段也從“面經”中獲益匪淺。但“面經”中的分類不是很清晰,具有針對性的試題和經驗也很難找到。為了方便後來者,筆者花費大量時間對企業真實面試題進行了改編,並從自身專業出發,著重關注前端程式設計師面試,並從中精選出若干具有代表性的技術類面試題進行深入剖析,希望能給前端面試人員提供更多參考。

本書特色

面試實戰

本書面試題全都來源於企業面試。近幾年來,關於Web前端開發職位的要求越來越高,致使大多數人在面試時出師不利。本書所包含的面試題中,涵蓋了前端最新的幾大主流技術,以及近幾年前端所涉及的大多數知識。

深入解析

本書用相當多的篇幅重點剖析試題,並配有Web前端資深工程師的解答,其中不乏前端套用中的方法與技巧。通過解析模擬面試題,能有效幫助讀者掌握Web前端技術,使讀者對前端面試更有把握。

筆風特色

本書名為《前端面試江湖》,筆者在編著此書時,將前端當成一個江湖,江湖分支有JavaScript、HTML5+CSS3、DIV+CSS、jQuery等幾大前端主流技術,書中還匯聚了從築基修煉到終極飛升的面試題。相信讀者會在閱讀的過程中感覺到做Web前端的不易,但我們也相信,你們會有鬥志繼續攻克前端,並在學習與拓寬前端的路上越走越遠。

本書內容結構

本書分為六篇,共19章,具體結構劃分如下。

第1~4篇:試題演練講解部分,共16章。這部分主要介紹JavaScript、HTML5+CSS3、DIV+CSS、jQuery等幾大前端主流技術。其中包含初級面試題、中級面試題、高級面試題、終極面試題。

第5篇:本篇內容是前端開發“17助力”,記錄一些有關前端崗位的綜合面試題,以及在面試過程中,除了我們在前面提出的幾大主流技術外,大多數企業面試題會涉及的知識點,提升讀者對前端知識的認識,並且本篇還有考驗程式設計師的邏輯思維的試題。

第6篇:本篇共兩章,主要內容為綜合測試題和人力資源面試相關的技巧,為讀者提供模擬面試題和人力資源常問的問題,為您的面試保駕護航。

本書面向的讀者

· 具有一定的Web前端基礎的求職者

· 具有計算機編程基礎或從計算機後端轉前端的求職者

· 各大院校學習計算機課程,並今後想從事Web前端工作的求職者

· Web前端開發在職人員

相關詞條

熱門詞條

聯絡我們