Tag Archives: JavaScript

JavaScript is the dynamic client side scripting language. It is most commonly used as part of web browsers. JavaScript is a prototype-based scripting language with dynamic typing and has first-class functions. You can alter the document content and can access any element of the DOM document. JavaScript is almost entirely object-based.

See the small example of the JavaScript:

...
function changeText() {
var txt = document.getElementById('btnclick').value;
if (txt == 'Show Image') {
document.getElementById('btnclick').value = 'Hide';
}
else if (txt == 'Hide Image') {
document.getElementById('btnclick').value = 'Show';
}
}
...

How to create and read cookies in JavaScript

The cookies are the small bit of the text data that can be stored in the user’s browser so that it can be reuse in the next request. Generally web server instruct to write the cookie on the user’ browser. But you can also manipulate the cookies using JavaScript. You can create, delete, modify and … Continue reading How to create and read cookies in JavaScript

How to prevent your javaScript code from syntax errors

The Syntax error in the JavaScript code is very common error type when your write the code. Generally when you write the wrong structure of the JavaScript code , browser will give the syntax error at the time of interpretation. Small syntax error in the JavaScript code on a Web page can stop the script … Continue reading How to prevent your javaScript code from syntax errors

How to detect the support of HTML 5 features on user’s browser

Basically Modernizr is an open-source JavaScript library that detects the support of native implementations of HTML5 and CSS3. First time I saw the use of the Modernizr JavaScript library in my first MVC4 web application in the BundleConfig.cs file. I had started the MVC4 with the internet template. At that time I don’t know the … Continue reading How to detect the support of HTML 5 features on user’s browser