📖 Samacheer Kalvi · 11th TN - English Medium · Computer Applications · Page 300question

CHAPTER 14

Chapter 8: CHAPTER 14 · Computer Applications

CHAPTER JavaScript Unit IV Introduction to JavaScript Chapter Pages browser program to start interpreting all the text between these tags as a script commands. The syntax of JavaScript segment in Hyper Text Markup Language (HTML) or Dynamic Hyper Text Markup Language (DHTML) is as follows: <script language="javascript" type="text/javascript"> JavaScript code </script> The <SCRIPT> tag takes two important attributes − Language − This attribute specifies that the scripting language. Typically, its value will be javascript . Although recent versions of HTML (EXtensible HyperText Markup Language - XHTML, its successor) have phased out the use of this attribute is optional.

Type − This attribute is used to indicate the scripting language and its value should be set to "text/javascript". . . Steps to follow to code JavaScript Language • Enter HTML and JavaScript code using any text editor.

• Save the latest version of this code. • Use any browser to see the result. For example : Internet Explorer, Google Crome, etc., • If this is a new document, open the file via browser's Open Menu. If the document is already loaded in the Memory, to reload the file into the browser use "Refresh" or press F5 button.

. . First JavaScript Program <Html> <Head> <Title>My First JavaScript Program</Title> <script language="javascript" type="text/javascript"> document.write("Hello World!") </script> </Head> <Body> </Body> </Html> Illustration . Simple JavaScript Program Output: .

Lexical Structure of a JavaScript Program The lexical structure of a programming language is the set of elementary rules that specifies how to write programs in that language. It is the lowest-level syntax of a language. The Chapter Pages Lexical structure specifies variable names, the delimiter characters for comments, and how one program statement is separated from the next. • Though JavaScript is a case-sensitive language.

It is good programming practice to type the command in lowercase. • JavaScript ignores spaces that appear between tokens (identifiers, operators, punctuator, constants and keywords) in programs. • JavaScript supports two styles of comments. Any text follow a “//” and the end of a line is treated

Related topics

Have a question about this topic?

Get an AI answer grounded in your actual textbook — with the exact page reference.

Ask AI about this topic →