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

利用 css 讓 ul 置中呈現

利用 css 讓 ul 置中...

以前寫網站...總是喜歡用Table 包住內容.. 而隨著時空的轉換...現在大都用div..或者....

CSS透明度

CSS透明度

CSS 透明度的實作, 各種瀏覽器和標準如下:(數字越小越透明) 標準: opacity:~ (Fi...

apache下設置不顯示目錄列表 Indexes FollowSymLinks

apache下設置不顯示目錄...

pexelsphoto5 選擇編輯httpd.conf文件 vi conf/httpd.conf 找...

Recommended reading

Other stories happened at this address

家庭式咖哩麵

家庭式咖哩麵

s 寒冷的冬天晚餐~就是要來一碗咖哩麵( ̄∇ ̄) 假日~Mandy下廚。 使用檳城帶回來的醬料包,煮...

淡紅色小藥丸

淡紅色小藥丸

s Drug Name Diclofenac mg tab 從沒想過,所謂的坐骨神經痛會發生在自己身...

靠!我的隨身硬碟壞了...

靠!我的隨身硬碟壞了...

靠!...壞了.... 我收集N年的mp、midi、記憶中的照片、Email備份、作品.....有些...

apache下設置不顯示目錄列表 Indexes FollowSymLinks

apache下設置不顯示目錄...

pexelsphoto 選擇編輯httpd.conf文件 vi conf/httpd.conf 找到...

解決png圖檔GD合圖後背景色塊問題

解決png圖檔GD合圖後背景...

重點在於設定圖片走透明通道~ $img = imagecreatefrompng($src); im...

元宵節快樂

元宵節快樂

元宵節快樂

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