Right way to embedded direct javascript code to Blogger template

I just usually forgot how to embedded javascript code to my Blogger templates. So I just want to share with you as a short quote and also help me each time I need add Js to a template. This tips always helps me prevent XML error when save template code. At first, Access your blog dashboard, choose Template. Then click Edit HTML. Not, insert before </head> tag or </body> tag with your javascript wrapper code like below:

<script type='text/javascript'>
// Place your javascript code here

Then click Save template



  • comment-avatar
  • comment-avatar

    thanks, it saved me some time.

  • comment-avatar
  • comment-avatar
  • comment-avatar

    i will ask something difirent. How did u do SELECT ALL CODE? Because i need this code

  • comment-avatar

    The idea is simple, I just add a button above all pre tags, and when a user click that button, I will move every code in pre tags into a textarea element. Finally, just focus and select all code in the textarea.

  • Leave a Reply