Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web Javascript - Basics DOM #33

Open
surfmuggle opened this issue Mar 11, 2021 · 2 comments
Open

Web Javascript - Basics DOM #33

surfmuggle opened this issue Mar 11, 2021 · 2 comments
Assignees
Labels
Milestone

Comments

@surfmuggle
Copy link
Owner

Please go through Einstieg in das DOM

@Dennis-V1
Copy link
Contributor

<head>
    <meta name="description" content="This is a small Tododlist using JS" />
    <meta charset="utf-8">
    <title>Todo List</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="css/style.css">
    <script src=""></script>
</head>

<body>
    <form action="" method="post"> 
        <div>  
            <p><label for="text">Ihre Todoliste bitte hier eintragen</label></p>
            <textarea id="text" name="text" cols="20" rows="2"></textarea> 	
            <button id="Todos">Todo Hinzufügen</button>
           <!-- <p><input type="submit" value="Todo Hinzufügen" /></p> -->
        </div> 
    </form> 
    <output id ="info"></output>
    <script>
        function anfang(){
            document.getElementById('Todos');
            //document.getElementById('info').innerText =text;
                .onklick = klickverarbetitung;
        }
        funtion klickverarbetitung(){
        document.querySelector('info');
            .innerText =Todos;
        }
    </script>

</body>

@surfmuggle
Copy link
Owner Author

surfmuggle commented Mar 18, 2021

Let and Var - block versus function scope

var letTest = function() {
    var fsc = 1; // functionScope
    console.log(fsc); // 1
    let x = 31; // blockScope
    if (true) 
    {
     
      let x = 71;  // andere variable da neuer blockScope
      console.log(x);  // 71
      fsc = 4;
      console.log(fsc); // 4
    } // ende Block
    console.log(x);  // 31
    x = x *2;
    console.log(x);  // ??
    console.log(fsc); //
  }

@surfmuggle surfmuggle added this to the web novice milestone Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants