Corrected test/hw javascript app.

Pascal J. Bourguignon [2021-03-29 04:42]
Corrected test/hw javascript app.
Filename
com.informatimago.www/test/hw/index.html
com.informatimago.www/test/hw/script.js
diff --git a/com.informatimago.www/test/hw/index.html b/com.informatimago.www/test/hw/index.html
index 423ce66..644acc0 100644
--- a/com.informatimago.www/test/hw/index.html
+++ b/com.informatimago.www/test/hw/index.html
@@ -1,21 +1,24 @@
 <html>
   <head>
-    <title>Hello World Web Application</title>
+    <title>Hello World Web Application</title>
+    <meta name = "viewport" content = "width = device-width, initial-scale = 1">
+    <link rel="stylesheet" type="text/css" href="style.css" />
     <script type="text/javascript">
       function addNode(){
           var newP = document.createElement("p");
-	      var textNode = document.createTextNode("Hello World!");
+	      var textNode = document.createTextNode("Hello World!");
+          console.log('Added New Node')
 	      newP.appendChild(textNode);
           document.getElementById("firstP").appendChild(newP);
       }
     </script>
-  </head>
+  </head>
   <body>
     <div class="d-flex h-100">
-      <button class="btn btn-warning m-auto">
+      <button class="btn btn-warning m-auto" onclick="addNode()">
         Click me!
       </button>
     </div>
-    <p id="firstP">firstP</p>
+    <p id="firstP">Please, click on the button above to add a new paragraph.</p>
   </body>
 </html>
diff --git a/com.informatimago.www/test/hw/script.js b/com.informatimago.www/test/hw/script.js
deleted file mode 100644
index ca21da9..0000000
--- a/com.informatimago.www/test/hw/script.js
+++ /dev/null
@@ -1,5 +0,0 @@
-$('button')
-    .html('Click me!')
-    .on('click', () => addNode()
-
-console.log('App started')
ViewGit