JavaScript String Object


The string object is used to represent a sequence of character. The string value should be written in quote then only it will consider as string otherwise it will be consider as integer. This tutorial highlights the benefits of using the JavaScript string object. Syntax of String Object String Properties Name Description constructor It is […]

How To Print Page using JavaScript


Some times we would like to print some important content on the web page via printer. The JavaScript provide print () method to print contents of the current window. It implements print() function of the window object. The print() method opens print dialog box which allows to select printing options. Syntax for Window.print The print() […]

Javascript – Dynamically Loading External JavaScript or CSS File


We can load external JavaScript(.js) and CSS(.cs) files on a page by giving reference in the head section of the web page. Syntax Loading JS file Following Example to show how to load external .js file The following code shows myfile.js file <script type=”text/javascript” src=”myfile.js”> tag is used to define client side script which uses […]

JavaScript Switch Statement


The switch statement is same as of if/else statement, instead using multiple if/ else statement we are using switch statement. The switch statement is selection control mechanism which allows value of a variable or expression to change the flow of the execution using multiple options. There are several options to be chosen from the available ones. […]

JavaScript document.createElement()


Document.createElement()  is used for creating element node. In HTML document, it creates specified HTML element .In other words it creates an instance of element for the specified tag. In document.createElement (), the element creates the element interface as soon it’s created. To create a text button, text node is created. The document.createElement( ) is supported by […]

Javascript Document Object


A document object represents the HTML document that is displayed in the window. Document is parent object of objects such as images, forms etc. The client window size is associated with the webpage which we access using document object in the JavaScript. This object is same as getElementById() method which we use to access the […]

JavaScript Navigator Object


The Navigator object specifies information about client’s browser window such as version, mime type and plug-ins. The window.navigator is read only property which gives reference to navigator object which provides information about application running the script. There is no public standard that applies to the navigator object, but all major browsers support it. JavaScript Navigator Object Syntax […]

JavaScript Location Object


This object is used to get information about current URL of the browser and automatically navigates the user to another page. This object is part of the window object and can be accessed using the window.location property. There is no public standard that applies to the location object, but all major browsers support it. JavaScript Location […]

JavaScript Screen Object


The screen object specifies information about dimensions of the user’s screen and display settings. It is special object for inspecting properties of the screen on which the current window is being rendered. There is no public standard that applies to the screen object, but all major browsers support it.  Javascript Screen Object Properties The following are the […]

How To Get Operating System using JavaScript


To determine operating system on the client machine, we can make use of navigator.appVersion or navigator.userAgent. Example To Get Operating System using JavaScript The following example demonstrates detection of operating system on the client machine.   <script type=”text/javascript”> tag is used to define client side script which uses attribute type for specifying MIME type. Navigator object […]

Please support the site
By clicking any of these buttons you help our site to get better