Skip to main content

Posts

Showing posts with the label JavaScript

Alert box in Browser Using JavaScript

Alert Box Using JavaScript The below code will demo used to display the alert message to user on the browsers window. <html> <head> <script type = "text/javascript" > function sayHello () { alert ( "Hello World" ) } </script> </head> <body> <input type = "button" onclick = " sayHello () " value = "Say Hello" /> </body> </html> Once the say hello button is clicked the alert will be shown with the defined messages on the browsers. Output: It will display the hello world with alert box.! Thanks and Regards, Tech bird

Warning for Non-JavaScript Browsers

Warning for Non-JavaScript Browsers If you have to do something important using JavaScript, then you can display a warning message to the user using  <noscript>  tags. You can add a  noscript  block immediately after the script block as follows − <html> <body> <script language = "javascript" type = "text/javascript" > document . write ( "Hello World!" ) </script> <noscript> Sorry...JavaScript is needed to go ahead. </noscript> </body> </html> Now, if the user's browser does not support JavaScript or JavaScript is not enabled, then the message from </noscript> will be displayed on the screen. Thanks and Regards, Tech Bird

Hello World Using JavaScript

JavaScript: JavaScript is a lightweight, interpreted programming language.  It is designed for creating network-centric applications.  It is complimentary to and integrated with Java.  JavaScript is very easy to implement because it is integrated with HTML.  It is open and cross-platform. Program to display hello world! Source code: <html> <body> <script language = "javascript" type = "text/javascript" > document . write ( "Hello World!" ) </script> </body> </html> Output:    Hello world! Thanks and Regards, Tech Bird

Lets Start with JavaScript

JavaScript: JavaScript is the programming language of HTML and the Web. JavaScript is easy to learn. JavaScript is most commonly used as a client side scripting language. why Study JavaScript? JavaScript is one of the 3 languages all web developers must learn:       HTML  to define the content of web pages     CSS  to specify the layout of web pages     JavaScript  to program the behavior of web pages JavaScript and Java are completely different languages, both in concept and design. what can we do with the JavaScript? You can do anything with the help of JavaScript. Cant Believe! Come Lets get Started. JavaScript Can Change HTML Content. JavaScript Can Change HTML Attributes. JavaScript Can Change HTML Styles (CSS). JavaScript Can Hide HTML Elements. JavaScript Can Show HTML Elements. Here in My Blog Learning should be made in much easier way so we will start with some interes...