Submit Search
Upload
Hidaya Institute of Science & Technology JavaScript Guide
•
Download as PPT, PDF
•
1 like
•
255 views
AI-enhanced title
Mudasir Syed
Follow
Javascript lecture 4
Read less
Read more
Education
Report
Share
Report
Share
1 of 10
Download now
Recommended
String functions and operations
String functions and operations
Mudasir Syed
AJAX, JSON, and Client-Side Templates
AJAX, JSON, and Client-Side Templates
RTigger
Javascript lecture 3
Javascript lecture 3
Mudasir Syed
Dreamweaver cs6
Dreamweaver cs6
Mudasir Syed
Java script lecture 1
Java script lecture 1
Mudasir Syed
Web forms and html lecture Number 4
Web forms and html lecture Number 4
Mudasir Syed
Dom in javascript
Dom in javascript
Mudasir Syed
String functions and operations
String functions and operations
Mudasir Syed
Recommended
String functions and operations
String functions and operations
Mudasir Syed
AJAX, JSON, and Client-Side Templates
AJAX, JSON, and Client-Side Templates
RTigger
Javascript lecture 3
Javascript lecture 3
Mudasir Syed
Dreamweaver cs6
Dreamweaver cs6
Mudasir Syed
Java script lecture 1
Java script lecture 1
Mudasir Syed
Web forms and html lecture Number 4
Web forms and html lecture Number 4
Mudasir Syed
Dom in javascript
Dom in javascript
Mudasir Syed
String functions and operations
String functions and operations
Mudasir Syed
PHP array 2
PHP array 2
Mudasir Syed
Css presentation lecture 3
Css presentation lecture 3
Mudasir Syed
Javascript 2
Javascript 2
Mudasir Syed
Css presentation lecture 1
Css presentation lecture 1
Mudasir Syed
String functions and operations
String functions and operations
Mudasir Syed
Cookies in php lecture 2
Cookies in php lecture 2
Mudasir Syed
PHP mysql Sql
PHP mysql Sql
Mudasir Syed
Oop in php lecture 2
Oop in php lecture 2
Mudasir Syed
PHP mysql Installing my sql 5.1
PHP mysql Installing my sql 5.1
Mudasir Syed
Ajax
Ajax
Mudasir Syed
Web forms and html lecture Number 5
Web forms and html lecture Number 5
Mudasir Syed
Error reporting in php
Error reporting in php
Mudasir Syed
Time manipulation lecture 1
Time manipulation lecture 1
Mudasir Syed
Web forms and html lecture Number 2
Web forms and html lecture Number 2
Mudasir Syed
Adminstrating Through PHPMyAdmin
Adminstrating Through PHPMyAdmin
Mudasir Syed
Php Mysql
Php Mysql
Mudasir Syed
PHP mysql Er diagram
PHP mysql Er diagram
Mudasir Syed
PHP mysql Database normalizatin
PHP mysql Database normalizatin
Mudasir Syed
Cookies in php lecture 1
Cookies in php lecture 1
Mudasir Syed
Css presentation lecture 4
Css presentation lecture 4
Mudasir Syed
Reporting using FPDF
Reporting using FPDF
Mudasir Syed
Functions in php
Functions in php
Mudasir Syed
More Related Content
Viewers also liked
PHP array 2
PHP array 2
Mudasir Syed
Css presentation lecture 3
Css presentation lecture 3
Mudasir Syed
Javascript 2
Javascript 2
Mudasir Syed
Css presentation lecture 1
Css presentation lecture 1
Mudasir Syed
String functions and operations
String functions and operations
Mudasir Syed
Cookies in php lecture 2
Cookies in php lecture 2
Mudasir Syed
PHP mysql Sql
PHP mysql Sql
Mudasir Syed
Oop in php lecture 2
Oop in php lecture 2
Mudasir Syed
PHP mysql Installing my sql 5.1
PHP mysql Installing my sql 5.1
Mudasir Syed
Ajax
Ajax
Mudasir Syed
Web forms and html lecture Number 5
Web forms and html lecture Number 5
Mudasir Syed
Error reporting in php
Error reporting in php
Mudasir Syed
Time manipulation lecture 1
Time manipulation lecture 1
Mudasir Syed
Web forms and html lecture Number 2
Web forms and html lecture Number 2
Mudasir Syed
Adminstrating Through PHPMyAdmin
Adminstrating Through PHPMyAdmin
Mudasir Syed
Php Mysql
Php Mysql
Mudasir Syed
PHP mysql Er diagram
PHP mysql Er diagram
Mudasir Syed
PHP mysql Database normalizatin
PHP mysql Database normalizatin
Mudasir Syed
Cookies in php lecture 1
Cookies in php lecture 1
Mudasir Syed
Css presentation lecture 4
Css presentation lecture 4
Mudasir Syed
Viewers also liked
(20)
PHP array 2
PHP array 2
Css presentation lecture 3
Css presentation lecture 3
Javascript 2
Javascript 2
Css presentation lecture 1
Css presentation lecture 1
String functions and operations
String functions and operations
Cookies in php lecture 2
Cookies in php lecture 2
PHP mysql Sql
PHP mysql Sql
Oop in php lecture 2
Oop in php lecture 2
PHP mysql Installing my sql 5.1
PHP mysql Installing my sql 5.1
Ajax
Ajax
Web forms and html lecture Number 5
Web forms and html lecture Number 5
Error reporting in php
Error reporting in php
Time manipulation lecture 1
Time manipulation lecture 1
Web forms and html lecture Number 2
Web forms and html lecture Number 2
Adminstrating Through PHPMyAdmin
Adminstrating Through PHPMyAdmin
Php Mysql
Php Mysql
PHP mysql Er diagram
PHP mysql Er diagram
PHP mysql Database normalizatin
PHP mysql Database normalizatin
Cookies in php lecture 1
Cookies in php lecture 1
Css presentation lecture 4
Css presentation lecture 4
Similar to Hidaya Institute of Science & Technology JavaScript Guide
Reporting using FPDF
Reporting using FPDF
Mudasir Syed
Functions in php
Functions in php
Mudasir Syed
Publishing Linked Data using Schema.org
Publishing Linked Data using Schema.org
DESTIN-Informatique.com
Graph Gurus Episode 1: Enterprise Graph
Graph Gurus Episode 1: Enterprise Graph
TigerGraph
UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3
DianaGray10
Google app engine - Soft Uni 19.06.2014
Google app engine - Soft Uni 19.06.2014
Dimitar Danailov
Asynchronous single page applications without a line of HTML or Javascript, o...
Asynchronous single page applications without a line of HTML or Javascript, o...
Robert Schadek
From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...
From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...
Connected Data World
Html5
Html5
prithag92
Open event presentation.3 2
Open event presentation.3 2
Jorge López-Lago
Build a game with javascript (april 2017)
Build a game with javascript (april 2017)
Thinkful
Scaling business app development with Play and Scala
Scaling business app development with Play and Scala
Peter Hilton
Stop Making The Web Harder Than It Is; Real-world REST, HATEOAS, and Hypermed...
Stop Making The Web Harder Than It Is; Real-world REST, HATEOAS, and Hypermed...
kiphampton
How To Build your own Custom Search Engine
How To Build your own Custom Search Engine
Richa Budhraja
Introduction to Open Data and Data Science
Introduction to Open Data and Data Science
Suraj Kumar Jana
Introduction to Microdata & Google Rich Snippets
Introduction to Microdata & Google Rich Snippets
Plus91 Technologies Pvt. Ltd.
SDSC18 and DSATL Meetup March 2018
SDSC18 and DSATL Meetup March 2018
CareerBuilder.com
Introduction to Microdata & Google Rich Snippets
Introduction to Microdata & Google Rich Snippets
Kishan Gor
Big Query - Women Techmarkers (Ukraine - March 2014)
Big Query - Women Techmarkers (Ukraine - March 2014)
Ido Green
Html5
Html5
prithag92
Similar to Hidaya Institute of Science & Technology JavaScript Guide
(20)
Reporting using FPDF
Reporting using FPDF
Functions in php
Functions in php
Publishing Linked Data using Schema.org
Publishing Linked Data using Schema.org
Graph Gurus Episode 1: Enterprise Graph
Graph Gurus Episode 1: Enterprise Graph
UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3
Google app engine - Soft Uni 19.06.2014
Google app engine - Soft Uni 19.06.2014
Asynchronous single page applications without a line of HTML or Javascript, o...
Asynchronous single page applications without a line of HTML or Javascript, o...
From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...
From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...
Html5
Html5
Open event presentation.3 2
Open event presentation.3 2
Build a game with javascript (april 2017)
Build a game with javascript (april 2017)
Scaling business app development with Play and Scala
Scaling business app development with Play and Scala
Stop Making The Web Harder Than It Is; Real-world REST, HATEOAS, and Hypermed...
Stop Making The Web Harder Than It Is; Real-world REST, HATEOAS, and Hypermed...
How To Build your own Custom Search Engine
How To Build your own Custom Search Engine
Introduction to Open Data and Data Science
Introduction to Open Data and Data Science
Introduction to Microdata & Google Rich Snippets
Introduction to Microdata & Google Rich Snippets
SDSC18 and DSATL Meetup March 2018
SDSC18 and DSATL Meetup March 2018
Introduction to Microdata & Google Rich Snippets
Introduction to Microdata & Google Rich Snippets
Big Query - Women Techmarkers (Ukraine - March 2014)
Big Query - Women Techmarkers (Ukraine - March 2014)
Html5
Html5
More from Mudasir Syed
Oop in php lecture 2
Oop in php lecture 2
Mudasir Syed
Filing system in PHP
Filing system in PHP
Mudasir Syed
Time manipulation lecture 2
Time manipulation lecture 2
Mudasir Syed
Sql select
Sql select
Mudasir Syed
PHP mysql Mysql joins
PHP mysql Mysql joins
Mudasir Syed
PHP mysql Introduction database
PHP mysql Introduction database
Mudasir Syed
PHP mysql Aggregate functions
PHP mysql Aggregate functions
Mudasir Syed
Form validation with built in functions
Form validation with built in functions
Mudasir Syed
Form validation server side
Form validation server side
Mudasir Syed
Form validation client side
Form validation client side
Mudasir Syed
PHP array 1
PHP array 1
Mudasir Syed
More from Mudasir Syed
(11)
Oop in php lecture 2
Oop in php lecture 2
Filing system in PHP
Filing system in PHP
Time manipulation lecture 2
Time manipulation lecture 2
Sql select
Sql select
PHP mysql Mysql joins
PHP mysql Mysql joins
PHP mysql Introduction database
PHP mysql Introduction database
PHP mysql Aggregate functions
PHP mysql Aggregate functions
Form validation with built in functions
Form validation with built in functions
Form validation server side
Form validation server side
Form validation client side
Form validation client side
PHP array 1
PHP array 1
Recently uploaded
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
sqpmdrvczh
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
iammrhaywood
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptx
LigayaBacuel1
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
Nguyen Thanh Tu Collection
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
RaymartEstabillo3
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
SherlyMaeNeri
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
MIPLM
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
nelietumpap1
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
Dr.Ibrahim Hassaan
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
thorishapillay1
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
Mark Reed
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
mkooblal
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
Anupkumar Sharma
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
phamnguyenenglishnb
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
AadityaSharma884161
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
9953056974 Low Rate Call Girls In Saket, Delhi NCR
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
OH TEIK BIN
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Mr Bounab Samir
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
Celine George
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
Celine George
Recently uploaded
(20)
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptx
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
Hidaya Institute of Science & Technology JavaScript Guide
1.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org Hidaya Institute of Science & Technology www.histpk.org A Division of Hidaya Trust, Pakistan
2.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org JAVASCRIPT BY: MUHAMMAD BAQAR QAZI
3.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org HISTORY AND LOCATION OBJECT •Each browser window or frame maintains a bunch of other information about the page you are currently visiting and where you have been. •The URL of the page you see in the window is called the location, and browsers store this information in the location object. •As you surf the Web, the browser stores the URLs of your past pages in the history object. •You can manually view what that object contains by looking in the browser menu for the item that enables you to jump back to a previously visited page.
4.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org HISTORY •As a user surfs the web, the browser maintains a list of URLs for the most recent stops. •This list is represented in the scriptable object model by the history object. [window.]history.property | method ([parameters]) length: The length property of the history object returns the number of elements in the history list. history.length
5.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org HISTORY back(): •The back() method of the history object takes the user to the previous page. The functionality results in the same as pressing the back button of the browser. history.back() forward(): •The forward() method of the history object loads the next URL in the History list. The functionality results are the same as pressing the forward button of the browser. history.forward() go(): If the programmer wishes to load a specified URL from the History list, then the go method of history object can be used. history.go(number) number can be positive or negative
6.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org LOCATION OBJECT •Location contains information about the current URL of the browser. The most common usage of Location is simply to use it to automatically navigate the user to another page: window.location.property|method(); href: If a programmer wants to set or return the entire URL, then the href property of location object can be used. window.location.href="http://www.google.com";
7.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org LOCATION OBJECT •assign(url): Load the document at the provided URL. •replace(url): Replace the current document with the one at the provided URL. •The difference from the assign() method is that after using replace() the current page will not be saved in session history, meaning the user won't be able to use the Back button to navigate to it. •It is better to use window.location or window.location.href because calling a function can be slightly slower than accessing the property but in terms of memory there should not be a big difference.
8.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org MATH OBJECT •JavaScript Math object is used to perform mathematical tasks. But unlike the String and the Date object which requires defining the object, Math object need not be defined. •Also, it provides a few constants such as pi. • The easiest way to get a value is to define a variable and set its value to a property or function of the Math Object. •If you want to use a property, which returns a constant value (such as pi), you would write something like this: •var my_car=Math.property; •var my_pie=Math.PI; •This returns the pi constant, a number with lots of decimals, or 3.14..... •If you want to use a member function, which performs a calculation, you would write something like this: •var my_house=Math.function(x);
9.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org MATH OBJECT Below is a table of some of the commonly used member functions of the Math object. These functions calculate values based on the parameters you send to them (except the random function): Method Function What it Does abs(x) Returns the absolute value of the variable x. cos(x) Returns the cosine of the variable x. log(x) Returns the natural log of the variable x. max(x,z) Returns the larger of the two variables x and z. min(x,z) Returns the smaller of the two variables x and z. pow(x,z) Returns the value of the variable x to the zth power. random() Returns a random number between 0 and 1. round(x) Returns the variable x rounded to the nearest integer. sin(x) Returns the sine of the variable x. sqrt(x) Returns the square root of the variable x. tan(x) ceil floor Returns the tangent of the variable x. Rounds a number UPWARDS to the nearest integer. Rounds a number DOWNWARDS to the nearest integer.
10.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org MATH.RANDOM() •The random() method function of the Math object allows you to get random numbers for various uses in your scripts. You can make a random quote generator or have another type of random script. •By default, the random function returns a random number between zero and 1. This by itself isn't very useful. number in is a long random number after the decimal point. •If you want a number between zero and 4 (5 random numbers), multiply the result of the Math.random() function by 5: •var ran_number= Math.random()*5; •Now, the numbers you get will be between zero and 4- but they still will not be integers. •We need these to be integers so we can have just the five random numbers between zero and 4. •To clean up those decimals and get just the integers, we use the Math.floor() function (which removes anything after the decimal and leaves the integer portion of the number) for the result. •var ran_number= Math.floor (Math.random()*5);
Download now