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

修練中

修練中

假日二胡修練中。

找對方法,開創自己的網路流量

找對方法,開創自己的網路流量...

前些天,Tim傳來了一個消息...http://classt...

colorbox 使用 onclick href 驅動

colorbox 使用 on...

colorbox 一直都是很優秀的Lightbox外掛... 目前的網站中幾乎或多或少都會用到Lig...

Recommended reading

Other stories happened at this address

知道自己不夠高,還特地去客廳搬他的寶物箱進來墊著,我是該哭還是該笑呢?

接下來,一團亂....

知道自己不夠高,還特地去客廳...

知道自己不夠高,還特地去客廳搬他的寶物箱進來墊著,我是該哭還是該笑呢? 接下來,一團亂....

白天給我睡得跟甚麼一樣,晚上就給我六國大封相...

白天給我睡得跟甚麼一樣,晚上...

白天給我睡得跟甚麼一樣,晚上就給我六國大封相...

The beginning of the day.

The beginning ...

The beginning of the day.

2018月亮節快樂!!

2018月亮節快樂!!

前些日子Wen哥分享了月份他去北極圈健行的紀錄 雖然說月份的北極圈是永晝的季節~ 但我仍想像著在寬廣...

還要cookies

還要cookies

U吵著Mandy說還要cookies。 當下我的腦袋裡卻閃過用session吧,cookie不安全。...

敬逝去的青春~

敬逝去的青春~

那年.........。 我們一起打工,派發著建設公司的傳單,腳下的摩托車跑遍萬巒、潮州、內埔、三地...

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