jquery - How to append javascript code to textarea? -


I'm trying to add a text that contains some textual JavaScript code but it automatically deletes all tags. How can I fix this problem?

Here is an example text from the database, and I have stored it in blogObject ['blog_content'] :

  & lt; Div data-config = "0/10000221" style = "width: 525px; height: 292px;" Class = "issuuembed" & gt; & Lt; / Div & gt; & Lt; Script type = "text / javascript" src = "// e.issuu.com/embed.js" async = "true" & gt; & Lt; / Script & gt; Some text is here & lt; A class = "fancybox" href = "http://ab5b871380c75ebbed44-0d6294cd72219e531b9ba85132078296.r10.cf2.rackcdn.com/userprofiles/2012/09/19/1/images/2014/11/04/org_1415121954_3b445d4fac6b78703bcf272307ac59f0.gif" & gt; & Lt; Img src = "http://ab5b871380c75ebbed44-0d6294cd72219e531b9ba85132078296.r10.cf2.rackcdn.com/userprofiles/2012/09/19/1/images/2014/11/04/org_1415121954_3b445d4fac6b78703bcf272307ac59f0.gif" width = "190" /> ; & Lt; / A & gt; Here are some text 2.  

when I $ ("# blog_content"). Html (blogObject ['blog_content']), to add the text above, here I am looking for:

  Here are some text some text here In the comment as @missa, I   

Val () instead of .html () . It worked for me.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -