Search This Blog

Thursday, November 9, 2017

Code Snippet on your Blog

Hello :)

While writing my previous post i was unaware how to copy code snippets (as their alignment have to be correct).

So here is how you do it

Go to HTML view of your blog and then add this at the header or at the top

<script language="javascript" src="" type="text/javascript">
<script language='javascript' type='text/javascript' src='' />

<script type='text/javascript'>
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {

and then paste your code snippet between the below mentioned tag

<pre class="prettyprint">
---your code here---

No comments:

Post a Comment