How can I display html tags inside an HTML document?

前端 未结 8 775
囚心锁ツ
囚心锁ツ 2020-12-10 04:16

I simply want to create something like that:

blah blah

I\'ve been trying to do this for a long time though for

相关标签:
8条回答
  • 2020-12-10 04:35

    How about replacing the incoming texts by < and > The tags should be visible in source view, but not "in normal view".

    0 讨论(0)
  • 2020-12-10 04:46

    You could use some javascript to change elements on the fly.

    If you use jQuery:

    $( 'pre' ).text( $( 'pre' ).html() );
    

    does the trick.

    0 讨论(0)
提交回复
热议问题