App下載

詞條

大約有 2,000 項符合查詢結(jié)果 ,庫內(nèi)數(shù)據(jù)總量為 78,250 項。(搜索耗時:0.0031秒)

361.JavaScript 使用正則表達(dá)式操作字符串

```javascript // Setup var testString = "Ada Lovelace and Charles Babbage designed the first computer and the software that would have run on it."; // 舉例 var expressionToGetSoftware = /software/gi; var softwareCount = testString.match(expressionToGetSoftware).length; // Only change code below th...

http://www.o2fo.com/chun5060/chun5060-ia3s24c1.html

362.JavaScript 使用正則表達(dá)式選取數(shù)值

```javascript // Setup var testString = "There are 3 cats but 4 dogs."; // Only change code below this line. var expression = /\d+/g;// Change this line // Only change code above this line // This code counts the matches of expression in testString var digitCount = testString.match(expression).lengt...

http://www.o2fo.com/chun5060/chun5060-gix324c2.html

363.JavaScript 使用正則表達(dá)式選取空白字符

```javascript // Setup var testString = "How many spaces are there in this sentence?"; // Only change code below this line. var expression = /\s+/g;// Change this line // Only change code above this line // This code counts the matches of expression in testString var spaceCount = testString.match(ex...

http://www.o2fo.com/chun5060/chun5060-9arg24c3.html

364.JavaScript 使用正則表達(dá)式轉(zhuǎn)化匹配

```javascript // Setup var testString = "How many non-space characters are there in this sentence?"; // Only change code below this line. var expression = /\S/g;// Change this line // Only change code above this line // This code counts the matches of expression in testString var nonSpaceCount = tes...

http://www.o2fo.com/chun5060/chun5060-7jtl24c4.html

365.Javascript中New xxx()的本質(zhì)

Javascript中, var a = new A();它做了如下幾件事, 創(chuàng)建一個空的對象object 把object綁定到函數(shù)A的上下文中(即A中的this現(xiàn)在指向object) 執(zhí)行函數(shù)A 返回object 所以,var a1 = new A()與var a2 = A()這兩句有著本質(zhì)的區(qū)別!

http://www.o2fo.com/kesyi/kesyi-wyx524r9.html

366.微信小程序 JavaScript支持情況

JavaScript 支持情況 運(yùn)行限制 基于安全考慮,小程序中不支持動態(tài)執(zhí)行 JS 代碼,即: 不支持使用 eval 執(zhí)行 JS 代碼 不支持使用 new Function 創(chuàng)建函數(shù) 客戶端 ES6 API 支持情況 微信小程序已經(jīng)支持了絕大部分的 ES6 API,已支持的 API 如...

http://www.o2fo.com/weixinapp/weixinapp-cad838s3.html

367.JavaScript 頁面類

JavaScript 頁面類 * [I. 代碼實現(xiàn)](/secguide/secguide-yj8r3fky.html) + [1.1 原生DOM API的安全操作](/secguide/secguide-1wo53fkz.html) + [1.2 流行框架/庫的安全操作](/secguide/secguide-cm6t3fl0.html) + [1.3 頁面重定向](/secguide/secguide-nzas3fl5.html) + [1.4 JSON...

http://www.o2fo.com/secguide/secguide-owmy3fkx.html

368.JavaScript 頁面重定向

...`link.href`、`area.href`、`input.formaction`、`button.formaction`; ```javascript // bad: 跳轉(zhuǎn)至外部可控的不可信地址 const sTargetUrl = getURLParam("target"); location.replace(sTargetUrl); // good: 白名單限定重定向地址 function validURL(sUrl) { return !!((/^(https?:\/\/)?[...

http://www.o2fo.com/secguide/secguide-nzas3fl5.html

369.JavaScript JSON 解析/動態(tài)執(zhí)行

...llow](https://github.com/douglascrockford/JSON-js/blob/master/json2.js) ```javascript // bad: 直接調(diào)用eval解析json const sUserInput = getURLParam("json_val"); const jsonstr1 = `{"name":"a","company":"b","value":"${sUserInput}"}`; const json1 = eval(`(${jsonstr1})`); // good: 使用JSON.parse...

http://www.o2fo.com/secguide/secguide-iulh3fl6.html

370.JavaScript 跨域通訊

...。 - 校驗來源時,應(yīng)使用`===`判斷,禁止使用`indexOf()` ```javascript // bad: 使用indexOf校驗Origin值 window.addEventListener("message", (e) => { if (~e.origin.indexOf("https://a.qq.com")) { // ... } else { // ... } }); // good: 使用postMessage時,限定Origin,且使用=...

http://www.o2fo.com/secguide/secguide-q9en3fl7.html

抱歉,暫時沒有相關(guān)的微課

w3cschool 建議您:

  • 檢查輸入的文字是否有誤

抱歉,暫時沒有相關(guān)的視頻課程

w3cschool 建議您:

  • 檢查輸入的文字是否有誤

抱歉,暫時沒有相關(guān)的教程

w3cschool 建議您:

  • 檢查輸入的文字是否有誤

361.JavaScript 使用正則表達(dá)式操作字符串

```javascript // Setup var testString = "Ada Lovelace and Charles Babbage designed the first computer and the software that would have run on it."; // 舉例 var expressionToGetSoftware = /software/gi; var softwareCount = testString.match(expressionToGetSoftware).length; // Only change code below th...

http://www.o2fo.com/chun5060/chun5060-ia3s24c1.html

362.JavaScript 使用正則表達(dá)式選取數(shù)值

```javascript // Setup var testString = "There are 3 cats but 4 dogs."; // Only change code below this line. var expression = /\d+/g;// Change this line // Only change code above this line // This code counts the matches of expression in testString var digitCount = testString.match(expression).lengt...

http://www.o2fo.com/chun5060/chun5060-gix324c2.html

363.JavaScript 使用正則表達(dá)式選取空白字符

```javascript // Setup var testString = "How many spaces are there in this sentence?"; // Only change code below this line. var expression = /\s+/g;// Change this line // Only change code above this line // This code counts the matches of expression in testString var spaceCount = testString.match(ex...

http://www.o2fo.com/chun5060/chun5060-9arg24c3.html

364.JavaScript 使用正則表達(dá)式轉(zhuǎn)化匹配

```javascript // Setup var testString = "How many non-space characters are there in this sentence?"; // Only change code below this line. var expression = /\S/g;// Change this line // Only change code above this line // This code counts the matches of expression in testString var nonSpaceCount = tes...

http://www.o2fo.com/chun5060/chun5060-7jtl24c4.html

365.Javascript中New xxx()的本質(zhì)

Javascript中, var a = new A();它做了如下幾件事, 創(chuàng)建一個空的對象object 把object綁定到函數(shù)A的上下文中(即A中的this現(xiàn)在指向object) 執(zhí)行函數(shù)A 返回object 所以,var a1 = new A()與var a2 = A()這兩句有著本質(zhì)的區(qū)別!

http://www.o2fo.com/kesyi/kesyi-wyx524r9.html

366.微信小程序 JavaScript支持情況

JavaScript 支持情況 運(yùn)行限制 基于安全考慮,小程序中不支持動態(tài)執(zhí)行 JS 代碼,即: 不支持使用 eval 執(zhí)行 JS 代碼 不支持使用 new Function 創(chuàng)建函數(shù) 客戶端 ES6 API 支持情況 微信小程序已經(jīng)支持了絕大部分的 ES6 API,已支持的 API 如...

http://www.o2fo.com/weixinapp/weixinapp-cad838s3.html

367.JavaScript 頁面類

JavaScript 頁面類 * [I. 代碼實現(xiàn)](/secguide/secguide-yj8r3fky.html) + [1.1 原生DOM API的安全操作](/secguide/secguide-1wo53fkz.html) + [1.2 流行框架/庫的安全操作](/secguide/secguide-cm6t3fl0.html) + [1.3 頁面重定向](/secguide/secguide-nzas3fl5.html) + [1.4 JSON...

http://www.o2fo.com/secguide/secguide-owmy3fkx.html

368.JavaScript 頁面重定向

...`link.href`、`area.href`、`input.formaction`、`button.formaction`; ```javascript // bad: 跳轉(zhuǎn)至外部可控的不可信地址 const sTargetUrl = getURLParam("target"); location.replace(sTargetUrl); // good: 白名單限定重定向地址 function validURL(sUrl) { return !!((/^(https?:\/\/)?[...

http://www.o2fo.com/secguide/secguide-nzas3fl5.html

369.JavaScript JSON 解析/動態(tài)執(zhí)行

...llow](https://github.com/douglascrockford/JSON-js/blob/master/json2.js) ```javascript // bad: 直接調(diào)用eval解析json const sUserInput = getURLParam("json_val"); const jsonstr1 = `{"name":"a","company":"b","value":"${sUserInput}"}`; const json1 = eval(`(${jsonstr1})`); // good: 使用JSON.parse...

http://www.o2fo.com/secguide/secguide-iulh3fl6.html

370.JavaScript 跨域通訊

...。 - 校驗來源時,應(yīng)使用`===`判斷,禁止使用`indexOf()` ```javascript // bad: 使用indexOf校驗Origin值 window.addEventListener("message", (e) => { if (~e.origin.indexOf("https://a.qq.com")) { // ... } else { // ... } }); // good: 使用postMessage時,限定Origin,且使用=...

http://www.o2fo.com/secguide/secguide-q9en3fl7.html

抱歉,暫時沒有相關(guān)的文章

w3cschool 建議您:

  • 檢查輸入的文字是否有誤

熱門課程