Home » Archive by category "Online Computer Education" (Page 11)

Lean Java Script, Referencing JavaScript in an External .js File, Lesson No. 17

      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 »

Learn Java Script, Writing Text with Strings, Lesson No. 15

  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 »

Learn How to Compare Values in Java Script, Lesson 14

  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 »

Learn How to Global Variable Create in Java Script, Lesson 11

  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 »

Learn Working with Variables in Java Script, Lesson 13

  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 »

Learn Working with Values in Java Script, Lesson 12

  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 »

Learn How to Hiding JavaScript Statements , Lesson 10

    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 »