0% found this document useful (0 votes)
16 views

Lecture5 PDF

This document discusses using JavaScript for web programming. It covers using JavaScript on both the client-side in the browser to manipulate web pages and the server-side with Node.js. Topics include JavaScript functions, events, DOM manipulation with querySelector, local storage, APIs, and JSON data formats.

Uploaded by

Moudi Mouhamadou
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Lecture5 PDF

This document discusses using JavaScript for web programming. It covers using JavaScript on both the client-side in the browser to manipulate web pages and the server-side with Node.js. Topics include JavaScript functions, events, DOM manipulation with querySelector, local storage, APIs, and JSON data formats.

Uploaded by

Moudi Mouhamadou
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Web Programming

with Python and JavaScript


JavaScript
Server

Client
JavaScript
<script>

</script>
<script>
alert('Hello, world!');
</script>
Functions

function hello() {
alert('Hello, world!');
}
Events
• onclick
• onmouseover
• onkeydown
• onkeyup
• onload
• onblur
• ...
querySelector

• document.querySelector('tag')
• document.querySelector('#id')
• document.querySelector('.class')
Local Storage

• localStorage.getItem(key)
• localStorage.setItem(key, value)
APIs
JSON
{
"origin": "New York",
"destination": "London",
"duration": 415
}
{
"origin": {
"city": "New York",
"code": "JFK"
},
"destination": {
"city": "London",
"code": "LHR"
},
"duration": 415
}
{
"rates": {
"EUR": 0.907,
"JPY": 109.716,
"GBP": 0.766,
"AUD": 1.479
},
"base": "USD"
}
JavaScript
Web Programming
with Python and JavaScript

You might also like