Loading...

javascript 底下使用 htmlspecialchars

Temperature: 0 °C

ChungChung
author_tools


javascript 底下使用 htmlspecialchars
Javascript中使用一個函數達到PHP的htmlspecialchars。

以下範例

function decodeHtml(str)
{
var map =
{
'&': '&',
'&lt;': '<',
'&gt;': '>',
'&quot;': '"',
'&#039;': "'"
};
return str.replace(/&amp;|&lt;|&gt;|&quot;|&#039;/g, function(m) {return map[m];});
}

以上紀錄

台北市內湖區江南街71巷75弄 Go

https://innstory.com/story-javascript_底下使用_htmlspecialchars-1515
寫程式筆記

Prev
 在手機上如何建立網址到手機桌面中並且使用圖示

Next
布拉格老城區耶誕市集 

Nearby Attractions

台北市內湖區江南街71巷75弄-Nearby Attractions

  • 臺北孔子廟 Go
  • 芝山岩隘門 Go
  • 總統府 Go
  • 台灣總督府交通局鐵道部(廳舍... Go
  • 王義德墓 Go
  • 臺北酒廠 Go

About the Author

Chung

我是chung
網路工作者
主業是網站系統開發建置
副業是做夢,寫故事
作品請參考/teme.biz
做夢請參考/innstory.com
聯絡/chung.teme@gmail.com

#有人用筆寫日記,有人用歲月寫日記,有人用照片寫日記,而我,用innstory寫日記。

Visitor message

Leave some footprints to prove that you visited me

Recommended reading

Author's other related stories

CSS3 box-shadow

CSS3 box-shado...

便利貼~俗稱小黃(對我來說),依據wiki的說法~是M公司的工程師史賓塞·席佛經過5年後出現成果。 ...

Welcome To Google

Welcome To Goo...

Top第一天,參訪了Google APAC HQ 第一次來到Google,難掩興奮心情,拼命的拍了一...

使用dp.SyntaxHighlighter 程式碼色彩顯示工具,讓紀錄程式心得更有可看性

使用dp.SyntaxHig...

說好了要在innstory裡寫下故事紀錄... 所以是不是有方便紀錄的工具或方式,就變成我在開發in...

Recommended reading

Other stories happened at this address

清炒青花菜佐尼伯特颱風

清炒青花菜佐尼伯特颱風

青花菜,十字花科,富含豐富維生素C和膳食纖維,還含有具強效抗癌性能的多種營養成分如二吲哚甲烷、維他命...

5U日常

5U日常

img滿歲的U,喜歡把自己硬擠進小盒子裡。 他以為他是貓? img然後,他找到根香蕉。

Android Studio 2.3 陽春型計算機

Android Studio...

andrio 原本這次的學習課題是,與使用者互動之「按一下」事件處理。 我按照工具書上寫的,完成了按...

爸爸媽媽你看~rainbow

爸爸媽媽你看~rainbow...

看著U排著字母色筆,當然這已經不是他第一次排列。 我跟Mandy只是在旁回應著他的呼喚,爸爸你看、媽...

父子時間,萬聖節小物DIY

父子時間,萬聖節小物DIY

父子時間,萬聖節小物DIY

紅燒豆腐佐海尼根

紅燒豆腐佐海尼根

e 其實我並不愛把豆腐弄熱來吃~ 小時後的記憶~豆腐就是該從冰箱拿出來淋上點醬油.... 冰冰涼涼的...

Please select an option

error

Hi, thank you for your participation, but you cannot vote repeatedly~

Join innstory now and start recording your story.

"Innstory" is a place to store stories. We are committed to becoming a warm platform. Deepening the bonds between people is our direction.
We are convinced that the blockchain between people is not just a cold calculation. Join us now.

Wrong format