Monday, 7 December 2015

How to properly insert HTML Java script in blogger

Error appears when a Javascript code is not well formatted or the codes are nit created properly by the developer. Recently , one of our user's requested How to properly put Javascript codes in blogger This article will turn out to be helpful for those who are just beginning to study blogger template and plugin development .

In this post, I will try to explain how to insert right add Javascript codes in blogger with proper starting and end codes.

Important Notice
Before installing any new code in blogger template always make sure that the script or style tags are appropriately closed. Usually you ignore to copy the ending script tag and in the end finally it shows mistake. In case you don't know a lot they use codes like this.

Read this:  How to send a file to Android from PC by wifi

           
ScriptjQuery (document).ready (function ($) {---------------});

Here it can easily be seen that the script tag is not followed by the right closing script tag which is incorrect. The correct method is to close the tags rightly, like we do in simple HTML coding. Let's go ahead and look the correct way of doing it with correct coding.

How to properly insert Javascript codes in blogger
Adding scripts in blogger is very straightforward. All you need to do is to visit blogger .com Your Site template Edit HTML. Now it depends on you where you want to paste your Javascript coding. However, we choose you to insert it above the head tag since this is the place where all technical things are present. Here's how the code would look file

 Script type='textJavascript'! [CDATA [Your Javascript coding here]] script

When the script is correctly added in your template hit the Save template button and this would not face any errors. Which means the Javascript is accurately put in your blogger template?

No comments:

Post a Comment