Skip to main content

Posts

Showing posts from October, 2013

javascript keywords list

Make sure you avoid all of JavaScript’s Key words. abstract as boolean break byte case catch char class continue const debugger default delete do double else enum export extends false final finally float for function goto if implements import in instanceof int interface is long namespace native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof use var void volatile while with

difference between html4 and html5 syntax

html4 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link type="text/css" rel="stylesheet" href="lounge.css"> <script type="text/javascript"> var yourVaribalName = true; </script> html 5  <!doctype html> <meta charset="utf-8"> <link rel="stylesheet" href="lounge.css"> <script src="lounge.js"></script> <script> var yourVaribalName = true; </script>

document getelementbyid in java script

document getelementbyid in java script by using this element  we can get element from the current document base on the element id <script> function fun1() { var con =document .getElementById ("text") alert(con.value) var str =document .getElementById ("text2")value alert(str); }  </script>   <input type="text" id ="text1" ></br> <input type="text" id ="text2"></br> <input type="button" value=click " onclick ="fun1()">