-2
我需要將HTML放入textarea的「祕密」方式。目前,我有一個textarea,當點擊提交按鈕時,它通過ajax/php將值發佈到MySQL。jQuery將文本從文本框轉換爲定位標記
而不是允許將HTML放入textarea框(出於安全原因),我想要一種方法來放置像#http://www.example.com/file.php#
。然後在提交,這將#符號裏的任何東西轉換爲錨標籤
這 - #http://www.example.com/file.php#
會變成這樣 - <a href='http://www.example.com/file.php'>www.example.com</a>
感謝所有downvotes ...沒有解釋爲什麼... – CFraley