now it print the value on browser in text formatĭocument.write('Hello'+' '+name+' '+'To my website') Var name =prompt('Please Enter Your Name:','Name') In name variable we will store value recived by popupbox In the following example, we will make simple popup box using Javascript. You can write multi-line comments in your code by Wrapping your comments in /* and */ as the start and finish of your comment, like this: /* Let myVar= "Some Value" Multi-line comments: Using the “//”(Double slash) to add single-line comments to your code. There are two different ways to add comments to your JavaScript code: Single-line comments: In Programming, Comments are very useful because they help other people to understand and can help to debug your code when it’s needed. So if your file is named script.js, then here’s how to call it in your HTML file. When you have large code collection, then its better to create separate JavaScript file and put all logic there to make code more efficiency and then link to it in your HTML file. Include JS in an HTML page, you’ll need to wrap the code in tags, like this: Read, 8 Most useful Jquery Selectors - You Need To Know How to add JavaScript in HTML? In this tutorial, I will teach the basic functionality of javascript to build dynamic web pages and web applications. Create Animations, Slideshows, Scrollers, etc.Put content in an HTML page on the fly.JavaScript is an easy and lightweight programming language of HTML and web. Learn JavaScript from Scratch What is JavaScript?Ī Programming language that is used to make web pages interactive. In this tutorial, I will teach you some basics of javascript. Today JavaScript has become one of the most popular programming languages on the web and the good part of JavaScript is easy to learn. In this post, we will learn JavaScript from the basics.
0 Comments
Leave a Reply. |