Posts

Showing posts from July, 2021

JAVA SCRIPT(DAY5) JAVA SCRIPT SECOND VIDEO

TEST.HTML  <!DOCTYPE html> <html> <head> <title></title> <script type="text/javascript"> //it is valid only for 10 days </script> </head> <body> <p id="th"></p> </body> <script src="test.js"></script> </html> TEST.JS This is a multiline comment Author : Harry document.write("This is an external js2"); document.getElementById('th').innerHTML = "This is a para"; var a1 = 45; var a11=5; var a2 = "This is me"; document.write(a1+a11,"<br>"); document.write(a1, a11,"<br>"); console.log("This is console"); console.log is used for debugging purposes var age = prompt("Tell me your age"); alert("Your age is ", age); document.write("5 + 9 = ", 5+9,"<br>"); document.write("5 - 9 = ", 5-9,"<br>"); document.write("5 * 9 = &qu

JAVA SCRIPT(DAY4)(ALL IN ONE VIDEO)

PROJECT2.HTML <!doctype html> <html lang="en"> <head>     <!-- Required meta tags -->     <meta charset="utf-8">     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">     <!-- Bootstrap CSS -->     <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"         integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">     <title>TODOs List</title> </head> <body>     <nav class="navbar navbar-expand-lg navbar-dark bg-dark">         <a class="navbar-brand" href="#">TODOs List</a>         <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"             aria-controls

JAVA SCRIPT(DAY 3) (ALL IN ONE VIDEO)

  PROJECT1.HTML <!doctype html> <html lang="en"> <head>     <!-- Required meta tags -->     <meta charset="utf-8">     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">     <!-- Bootstrap CSS -->     <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"         integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">     <title>Hello, world!</title>     <script>         let a;         let date;         let time;         const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };         setInterval(() => {             a = new Date();              date = a.toLocaleDateString(undefined, options);             time = a.getHours() + ':' + a.getM

JAVA SCRIPT(DAY 2)(ALL IN ONE VIDEO)

  INDEX.JS // 1. Ways to print in JavaScript // console.log("Hello World"); // alert("me"); // document.write("this is document write") // 2. Javascript console API // console.log("Hello World", 4 + 6, "Another log"); // console.warn("this is warning"); // console.error("This is an error"); // 3. JavaScript Variables // What are Variables? - Containers to store data values /* multi  line  commment */ var number1 = 34; var number2 = 56; // console.log(number1 + number2); // 4. Data types in JavaScript // Numbers var num1 = 455; var num2 = 56.76; // String var str1 = "This is a string"; var str2 = 'This is also a string'; // Objects var marks = {     ravi: 34,     shubham: 78,     harry: 99.977 } // console.log(marks); // Booleans var a = true; var b = false; // console.log(a, b); // var und = undefined; var und; // console.log(und); var n = null; // console.log(n); /* At a very high level, there are

JAVA SCRIPT DAY 1(ALL IN ONE VIDEO IN JS)

  CODE WRITTEN IN VIDEO CODE WITH HARRY <!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>JavaScript Tutorial</title>     <style>         *{             margin: 0;             padding: 0;         }         .container{             border: 2px solid red;             margin: 3px 0;             background: cyan;             padding: 9px;         }         .bg-primary{             background-color: blueviolet;         }         .text-success{             color: white;         }     </style> </head> <body>     <h1>Welcome to this JavaScript Tutorial</h1>     <div id="firstContainer" class="container">         <button id="click" onclick="clicked()">Click Me</button>          <p>This is a paragraph which is the be