What I'm trying to do is display a snippet of javascript on the page, and not have it run, just display as a code snippet for folks to copy. I load google's Prettify, then in the page I have this code:
<pre class="prettyprint">
<script>
$(document).ready(function(){
setTimeout(function(){
console.log('deleting cookie');
$.cookie('cookie',null,{domain: document.domain});
},1000);
});
</script>
</pre>
But this code just executes and doesn't display the JS snippet. What am I missing here?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…