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

這個星期六日要同朋友去參加一個聚會...黑客松Hackathon... 老實說我根本不知道那是什麼....

jQuery效果滑動隱藏

jQuery效果滑動隱藏

因為需要所以紀錄下來,主要是要透過點選按鈕將字串隱藏或顯示出來... 雖說可以直接用hide或是sh...

PHP數字轉國字...

PHP數字轉國字...

什麼鬼...客戶系統的需求竟然有一個數字要轉成國字.... 數字轉國字...數字轉國字...就是要把...

Recommended reading

Other stories happened at this address

我以前不可能做這些事~

我以前不可能做這些事~

我以前~ 不可能在坐在電腦前時還得抱著你。 不可能在應該拿著滑鼠的手卻得要拿著奶瓶。 不可能走在外頭...

住家後頭的小公園,這隻有讓我想起魔女宅急便裡的GIGI~

住家後頭的小公園,這隻有讓我...

住家後頭的小公園,這隻有讓我想起魔女宅急便裡的GIGI~

SSL憑證

SSL憑證

pexelsphotossl 終於~為innstory申請了SSL安全憑證。 安裝的過程中出了點狀況...

豬腳麵線

豬腳麵線

搞定U跟G後。 假日的晚餐。 煮了一把麵線配上家鄉媽媽滷的豬腳。 簡單吃。

我的EIZO

我的EIZO

n 好久沒有畫畫了,自從走上程式這條不歸路....也越來越不會畫了...@@ 今天就來想念一下我的E...

挺進7個月囉~

挺進7個月囉~

個月了~最近開始偶爾會腳抽筋,所以鈣的部份得多補充了.... 而且小傢伙在Mandy肚子裡好像工程越...

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