开发者

Embed html into an existing div

开发者 https://www.devze.com 2023-01-11 07:46 出处:网络
When the html is returned from django views <script> //The following is in the ready function $(\"#data\").html(\"{{dict.html}}\");

When the html is returned from django views

   <script>
   //The following is in the ready function
   $("#data").html("{{dict.html}}");
   </script>
    <div id="data开发者_StackOverflow" name="data" style="display:block;"></div>

The following html is displayed on the screen.How to embed this html into data div

     <ul ><li ><a ><ins> </ins>Ses</a><ul ><li>


Try passing the safe filter

$('#data').html({{dict.html|safe}});
0

精彩评论

暂无评论...
验证码 换一张
取 消