Skip to content

Latest commit

 

History

History
63 lines (44 loc) · 3.27 KB

File metadata and controls

63 lines (44 loc) · 3.27 KB

Object-Oriented Programming, HTML Tables

What is Table?

A table represents information in a grid format

How to Create table??

  • Basic table structure

basictable

th: table header tr :table row td : table feild or column

  • Spanning Rows

rowspan

  • Long Tables

longtable ltable

  • Old Code: Width & Spacing

wastable

  • Old Code: Border & Background

borderimage

  • Constructur notation in Javascript

In constructor notation, we are creating an object by calling the constructor function with the new keyword.

dogobject

  • The function can be used to create multiple objects. The this keyword is used instead of the object name.

  • what is this keyword???
    • The keyword this is commonly used inside functions and objects. Where the function is declared alters what this means. It always refers to one object, usually the object in which the function operates.
  • Arrays are Objects
    • Arrays are a special type of objects. The typeof operator in JavaScript returns "object" for arrays. But, JavaScript arrays are best described as arrays.
  • Objects in an array

obarr

  • What is the built-in objects?

    • Browsers come with a set of built-in objects that represent things like the browser window and the current web page shown in that window. These built-in objects act like a toolkit for creating interactive web pages.

    • there are three groups of built-in object
    • 1- The Browser Object Model (BOM)

    • is used to interact with the browser. The default object of browser is window means you can call all the functions of window by specifying window or directly. For example: window.alert("hello javatpoint"); is same as: alert("hello javatpoint");

    • 2- DOM (Document Object Model) The W3C DOM standard is separated into 3 different parts:

      • 1- Core DOM - standard model for all document types
      • 2- XML DOM - standard model for XML documents
      • 3- HTML DOM - standard model for HTML documents
    • 3- The global JavaScript objects* represent things that the JavaScript language needs to create a model of. For example, there is an object that deals only with dates and times.

    • how to create random number?

      • The Math object's random() method generates a random number between 0 and 1 (with many decimal places).
      • To get a random whole number between 1 and 10, you need to multiply the randomly generated number by 10.

      random