e commerce mcq questions and answers

  Multiple Choice Questions & Answers:- 1.Which of the following describes e-commerce? a. Doing business electronically b. Doing business c. Sale of goods d. All of the above Answer: A 2.Which of the following is part of the four main types for e-commerce? a. B2B b. B2C c. C2B d. All of the above Answer: … Read more

tudo app using html and css javascript

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will Devloped tudo app using html and css javascript .So let’s go to our to.

Index.html

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>TODO APPLICATION</title>
    <link
      href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
      rel="stylesheet"
      integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"
      crossorigin="anonymous"
    />
  </head>
  <body class="bg-primary">
    <!-- main html content -->

    <div class="container my-2">
      <h1 class="text-center text-white">TODO APPLICATION</h1>

      <div class="card">
        <div class="card-body">
          <form action="#">
            <input
              id="title"
              type="text"
              class="form-control"
              placeholder="Enter todo title"
            />

            <br />

            <textarea
              id="desc"
              cols="30"
              rows="10"
              class="form-control"
              placeholder="Enter todo description"
            ></textarea>

            <div class="container text-center mt-2">
              <button onclick="add_todo()" class="btn btn-primary">
                ADD TODO
              </button>
            </div>
          </form>
        </div>
      </div>

      <br />

      <div class="main-content" id="main-content"></div>
    </div>

    <script>
      const add_todo = () => {
        let title = document.getElementById("title").value;
        let desc = document.getElementById("desc").value;

        let todos = [];

        //string
        let localTodos = localStorage.getItem("todos");

        if (localTodos != null) {
          todos = JSON.parse(localTodos);
        }

        let todoObject = {
          title: title,
          desc: desc,
          id: Math.trunc(Math.random() * 1000),
        };

        todos.push(todoObject);

        localStorage.setItem("todos", JSON.stringify(todos));

        show_todo();

        //case:

        //
        // localStorage.setItem(todos, [{title,desc},{title,desc},{title,desc}]);

        //todos=>[]
      };

      //show the data

      const show_todo = () => {
        let todoString = localStorage.getItem("todos");

        let content = "";

        if (todoString == null) {
          //no todo
          content += "<h3 class='text-white'>NO TODO TO SHOW</h3>";
        } else {
          let todos = JSON.parse(todoString);
          for (let todo of todos.reverse()) {
            content += `
              
              
              <div class='card mt-2'>
                <div class='card-body'>
                       <h3>${todo.title}</h3>
                       <p>${todo.desc}</p> 
                </div>    
              </div>
              
              
              `;
          }
        }

        document.getElementById("main-content").innerHTML = content;
      };

      show_todo();
    </script>
  </body>
</html>

So I hope that you learn about the tudo app using html and css javascript   And if you have any more queries about progrmming ,web Devlopment ,tech,computer relegated then feel free to discuss your problem in the comment section.Thank you so much and come back for more updates about Techgsr.co .

Related post

  1.  tudo app using html and css javascript

  2. how to create age calculator in html project

  3. how to make toast in html css and javascript

  4. how to make copy to clipboard in javascript

  5. how to create email validation in javascript

 

 

how to create age calculator in html project

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will Devloped create age calculator in html project .So let’s go to our to. <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″ /> <meta http-equiv=”X-UA-Compatible” content=”IE=edge” /> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″ /> <title>Age Calculator</title> <link href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css” rel=”stylesheet” integrity=”sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl” crossorigin=”anonymous” /> <style> body { background: … Read more

how to make toast in html css and javascript

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will make toast in html css and javascript .So let’s go to our to. HTML :- <div class=’toast’ style=’display:none’>I did something!</div> <button>Do something!</button>   CSS:- body, html { height:100%; width:100%; min-height:100%; padding:0; margin:0; } .toast { width:200px; height:20px; height:auto; position:absolute; left:50%; margin-left:-100px; bottom:10px; background-color: #35bc7a; … Read more

how to create email validation in javascript

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will developed how to create email validation in javascript  .So let’s go to our to. HTML  <script src=”https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js”></script> <form> <p>Enter an email address:</p> <input id=’email’> <button type=’submit’ id=’validate’>Validate!</button> </form> <h2 id=’result’></h2> javascript:- main.js file function validateEmail(email) { const re = /^(([^<>()[\]\\.,;:\s@\”]+(\.[^<>()[\]\\.,;:\s@\”]+)*)|(\”.+\”))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return re.test(email); } function … Read more

how to make copy to clipboard in javascript

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will developed copy to clipboard in javascript   .So let’s go to our to. HTML code:- <p> <button class=”js-textareacopybtn” style=”vertical-align:top;”>Copy Textarea</button> <textarea class=”js-copytextarea”>Hello I’m some text</textarea> </p> Javascipt:- var copyTextareaBtn = document.querySelector(‘.js-textareacopybtn’); copyTextareaBtn.addEventListener(‘click’, function(event) { var copyTextarea = document.querySelector(‘.js-copytextarea’); copyTextarea.focus(); copyTextarea.select(); try { … Read more

selection sort algorithm in data structure

Algorithm: Step 1: Select 1St element of the list. Step 2: Compare selected elements with other elements in the list one by one. Step 3: For every comparison, if any element is smaller then selected element then these two are swapped. Step 4: Repeat the same procedure with next position in the list till the … Read more

Predict the output of following C++ program in cpp

 

 Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about  Predict the output of following C++ program in cpp .So let’s go to our topic

#include<iostream>
using namespace std;
class Test
{
static int i;
int j;
};
int Test::i;
int main()
{
cout << sizeof(Test);
return 0;
}

Assume that integers take 4 bytes.

Output:
4 (size of integer)
static data members do not contribute in size of an object. So ‘i’ is not considered in size
of Test. Also, all functions (static and non-static both) do not contribute in size.

Related Post:-

Predict the output of following C++ program in cpp

Print 1 to 100 in C++, without loop and recursion

Factorial Using Loop Example Program In C++

bfs algorithm in data structure (BFS)

if..else Statement Example Program In C++

For Loop Example Program In C++

Program to find the sum of each row & column of a matrix of size n x m andif matrix is square, find the sum of the diagonals also.

 tudo app using html and css javascript

how to create age calculator in html project

how to make toast in html css and javascript

how to make copy to clipboard in javascript

how to create email validation in javascript

So I hope that you learn about the  Predict the output of following C++ program in cpp And if you have any more queries about computer relegated then feel free to discuss your problem in the comment section.Thank you so much and come back for more updates about Techgsr.co .

how to write nested loop in cpp

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about  how to write nested loop in cpp.So let’s go to our topic #include <iostream> using namespace std; int main () { // local variable declaration: int a = 100; int b = 200; // check the boolean condition if( a … Read more