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

圖型插件Elastislide

圖型插件Elastislid...

teach Elastislide是一款好用的圖形插件......

Photoshop 曲線文字建置

Photoshop 曲線文字...

Photoshop一直都是很強悍的繪圖軟體。 裡頭的【鋼筆工具】,可以拉貝茲曲線的.... 我剛開始...

行事曆功能導入

行事曆功能導入

cc55 Innstory有行事曆囉! 我試著把Innstory當作是我的筆記本,將生活發生的故事紀...

Recommended reading

Other stories happened at this address

啊~是在拍我嗎?

啊~是在拍我嗎?

啊~是在拍我嗎?

2018月亮節快樂!!

2018月亮節快樂!!

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

關掉phpinfo()

關掉phpinfo()

pexelsphotod 配置php環境的時候往往都會寫 phpinfo(); 這個函數來測試php...

清除網頁暫存(no cache)

清除網頁暫存(no cach...

pexelsphoto 在製作專案時,有沒有試過JS 或 CSS 明明就已經更新了~ 但頁面卻像鬼打...

一碗麵,簡簡單單的午餐、簡簡單單的滿足。

一碗麵,簡簡單單的午餐、簡簡...

塊錢的豆芽、塊錢的韭菜、塊錢的青江菜、塊錢的香菜、塊的細黃麵。 加上紅蔥頭肉燥、一點黑醋,攪拌一起。...

5G,40週了。

5G,40週了。

其實已經超過週了,G卻似乎還不想退房~ 是住在媽媽肚子裡太舒服了? 目前醫生給的期限是最遲號催生,年...

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