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

校外教學(木柵動物園)

校外教學(木柵動物園)

期中考週的校外教學,來到了上回去不成的木柵動物園。 炎熱的天,帶著位小蘿蔔頭,一邊觀察一邊完成老師交...

動態留言功能調整

動態留言功能調整

guestmap55 最近改進了朋友動態的發文方式.... 一開始在功能方面加上了googlemap...

小小消防員初體驗

小小消防員初體驗

年月日,5U幼兒園參加消防夏令營。

Recommended reading

Other stories happened at this address

櫻花樹下其實一點都不浪漫

櫻花樹下其實一點都不浪漫

a 以前,總覺得不管甚麼東西放在盛開的櫻花樹下,那種浪漫感覺是不可多得的時光。 自從車子停在浪漫的櫻...

元宵節快樂

元宵節快樂

元宵節快樂

第133天,目前已晉升為翻身達人。

第133天,目前已晉升為翻身...

第天,目前已晉升為翻身達人。

如何關閉電腦版 LINE 對話視窗中的那棵(櫻花樹)背景特效

如何關閉電腦版 LINE 對...

有沒有發現最近的LINE對話視窗的背景多了個櫻花特效? 原本想說手機板上的只是飄櫻花的花瓣就還好~ ...

第一天上學,意外的順利。

第一天上學,意外的順利。

沒有分離焦慮,沒有十八相送。 U第一天上學竟然意外的順利\(^o^)/ 早上帶他去幼稚園,跟他說爸爸...

5G滿三個月

5G滿三個月

G滿三個月了。 最近有一點咳嗽,看來還是加入了我們是一家人的行列(╯з╰) 奶量非常難抓,有時cc ...

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