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

黑客松Hackathon(二)

黑客松Hackathon(二...

這是一次不同的體驗... 我一直都渴望有所謂的工作團隊並且享受共同討論共同創作的樂趣... 這次在黑...

Photoshop 曲線文字建置

Photoshop 曲線文字...

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

PHP的日期加減運算

PHP的日期加減運算

在再加上5天 = $years = date("Y"); //用date()函式...

Recommended reading

Other stories happened at this address

鍾5U VS 孔雀餅乾

鍾5U VS 孔雀餅乾

午后,點心時間。 U自己拿了孔雀餅乾盒給我,用手指了指然後發出啊啊啊啊的聲音。 我知道他是告訴我他想...

下一站,父親。

下一站,父親。

i 我無法掩飾我內心的喜悅... 為了等待你的到來,我跟你媽媽也歷經了數個年頭的等待、期待... 因...

關掉phpinfo()

關掉phpinfo()

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

2018月亮節快樂!!

2018月亮節快樂!!

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

5個多月,學會了向後爬行。

5個多月,學會了向後爬行。

個多月,學會了向後爬行。

Taare Zameen Par 心中的小星星

Taare Zameen P...

晚餐時間,看了一部印度電影【Taare Zameen Par】 taarezameenpar 一部很...

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