webdevh8.1

<!-- oefening 1 -->

<!DOCTYPE html>
<html lang="nl">

<head>
    <title>Oefening 1</title>
</head>

<body>
		
    <script type="text/javascript">
	
	    var a = 3;
    	var b = 4;
    
        document.write(a);
        document.write('+');
        document.write(b);
    	document.write('=');
        document.write(a + b);

    </script>
	
</body>

</html>

Download hier het bestand.
<!-- oefening 2 -->

<!DOCTYPE html>
<html lang="nl">

<head>
    <title>Oefening 2</title>
</head>

<body>

    <script type="text/javascript">
    	
		var a = 3;
    	var b = 4;
		var c = a + b;
    
        document.write(a);
        document.write('+');
        document.write(b);
        document.write('=');
        document.write(c);

    </script>
	
</body>

</html>

Download hier het bestand.
<!-- oefening 3 -->

<!DOCTYPE html>
<html lang="nl">

<head>
    <title>Oefening 3</title>
</head>

<body>

    <script type="text/javascript">
    	
		var a = prompt("Vul het 1e getal in");
    	var b = prompt("Vul het 2e getal in");
    
        document.write(a);
        document.write('+');
        document.write(b);
    	document.write('=');
        document.write(a + b);
      
    </script>

</body>

</html>

Download hier het bestand.
<!-- oefening 4 -->

<!DOCTYPE html>
<html lang="nl">

<head>
    <title>Oefening 4</title>
</head>

<body>
    
    <script type="text/javascript">
	
		var datum = new Date();		
    	var datum = new Date(datum.getFullYear(), datum.getMonth(), datum.getDate());

		document.write('Vandaag is het: ' + datum);
        
    </script>


</body>

</html>

Download hier het bestand.