Home »
Archive by category "Online Computer Education" (Page 11)
To store your JavaScripts in external files, you need to save them as plain text files with a .js file extension. You then need to add the SCR attribute to the opening <SCRIPT> tag in your HTML page as demonstrated here. <SCRIPT SRC=”Test.js” LANGUAGE=”JavaScript” TYPE=”Text/JavaScript”> </SCRIPT> In this example, an external JavaScript named Test.js has been specified. This external JavaScript can contain any number of JavaScript statements. However,...
Continue reading »
October 16, 2015 evirtualguru_ajaygourOnline Computer EducationNo Comment
As you know, there are two places you can put your JavaScripts in an HTML page: in either the head or body section. In addition, I have told you that you can either embed JavaScript directly into the HTML page or reference it in as an external .js file. One more way you can integrate JavaScript into an HTML page is as a component in an HTML tag. Placing JavaScripts...
Continue reading »
October 16, 2015 evirtualguru_ajaygourOnline Computer EducationNo Comment
We have spent a lot of time already this morning learning about how to work with values. One object in particular, the String object, you will find yourself using over and over again in your scripts. I thought I’d spend a little time going over the String object now, even though the lesson on JavaScript and JScript objects isn’t until this later this morning. Consider this a sneak preview. The...
Continue reading »
October 16, 2015 evirtualguru_ajaygourOnline Computer EducationNo Comment
Comparing Values One of the things you will find yourself doing in your scripts is comparing the values of variables. For example, you might take one action if a variable has a value less than 10 and a different action when the variable is greater than 10. Table 2.4 provides a list of JavaScript and JScript comparison operators you can use in your scripts. JAVASCRIPT AND JSCRIPT COMPARISON OPERATORS The...
Continue reading »
October 5, 2015 evirtualguru_ajaygourOnline Computer Education
Global Variables in Java Script. A global variable is any variable defined outside of a function. Such a variable is global because any script statement located in the Web page or script file can refer to it. You can create a global variable in several ways, including: Creating the variable by referencing it inside a function without first declaring it using the var keyword. Creating the variable anywhere else in...
Continue reading »
October 5, 2015 evirtualguru_ajaygourOnline Computer EducationNo Comment
Working with Variables I have to go over a few more things relating to variables before we move on. These important aspects of variables include the rules that govern the naming of variables and how to define variable scope. Rules for Variable Names Keep the following rules in mind when creating variables: Variable names can consist only of uppercase and lowercase letters, the underscore character, and the numbers 0 through...
Continue reading »
October 5, 2015 evirtualguru_ajaygourOnline Computer EducationNo Comment
Working with Values JavaScripts and JScripts store information as values. For example, if you were to create a form for your users to fill out, each entry in the form would contain a separate value. Your scripts can store these values in variables and then use the variables throughout your script. The list of the types of values supported by JavaScript and JScript. JAVASCRIPT AND JSCRIPT VALUES Value ...
Continue reading »
October 5, 2015 evirtualguru_ajaygourOnline Computer EducationNo Comment
HTML comments begin with the characters <!– and end with –>. The browser knows not to display anything between these sets of characters. You also know that the HTML <SCRIPT> tag is used to embed JavaScript into HTML pages. Both JavaScript and non-JavaScript browsers know not to display the <SCRIPT> tags. However, non-JavaScript browsers do not know what to make of the statements within the <SCRIPT> tags, so they...
Continue reading »
October 5, 2015 evirtualguru_ajaygourOnline Computer EducationNo Comment
Page 11 of 13« Prev
1
…
8
9
10
11
12
13
Next »