The Global object has properties and methods at the highest level, without a parent object. This means that global properties and functions can be used with all the built-in JavaScript objects.


• The Global object has three properties:
Global object methods (or functions):
- In the following example is a JS script that uses the method eval() twice, transform and interpret the argument received as a JavaScript code.
<script type="text/javascript"><!--
function calcs(form) {
  form.re.value = eval(form.expr.value);
}
eval("alert('Have a good life!')");
--></script>
<form>
 <p>Enter a mathematical expression (addition, subtraction, multiplication, division), for example (7*8 or 3+8/2): </p>
 <input type="text" name="expr" size="35" />
 <input type="button" name="calc" value="Calculation" onclick="calcs(this.form)" /><br />
 The result is:
 <input type="text" name="re" size="18">
</form>
- This code displays an alert window and then the following result. A form that you can use for simple math operations:

Enter a mathematical expression (addition, subtraction, multiplication, division), for example (7*8 or 3+8/2):


The result is:

Daily Test with Code Example

HTML
CSS
JavaScript
PHP-MySQL
Which tag create a highlighted bolded text?
<q> <strong> <em>
<p>Address: <strong>http://CoursesWeb.net/</strong> - Tutorials.</p>
Which of these CSS codes displays the text bolded?
text-size: 18px; font-style: italic; font-weight: 800;
#id {
  font-weight: 800;
}
What JavaScript function can be used to call another function multiple times, to a specified time interval?
setInterval() setTimeout() push()
function someFunction() { alert("CoursesWeb.net"); }
setInterval("someFunction()", 2000);
Click on the correctly defined variable in PHP.
var vname = 8; $vname = 8; $vname == 8;
$vname = 8;
echo $vname;
Global Object

Last accessed pages

  1. Add, Change, and Remove Attributes with jQuery (21328)
  2. Display data from PHP Array, or MySQL in HTML table (8710)
  3. Courses Web: PHP-MySQL JavaScript Ajax HTML CSS Flash-AS3 (43889)
  4. Lost in a Fairy Tale (70)
  5. Various Games (648)

Top accessed pages

  1. Courses Web: PHP-MySQL JavaScript Ajax HTML CSS Flash-AS3 (43889)
  2. PHP-MySQL free course, online tutorials PHP MySQL code (33288)
  3. Read Excel file data in PHP - PhpExcelReader (33148)
  4. Get Attribute (ID, Class, Name, Title, Src) with jQuery (29962)
  5. PHP PDO - exec (INSERT, UPDATE, DELETE) MySQL (27281)