Page 277 - Web Applications (803) Class 12
P. 277

var str1 = document.getElementById(“W1”);

                                      str1.textContent = “Welcome “ + tname + “!”;
                                  }

                              }
                          </script>

                      </body>

                      </html>
                       Output:





















































                   10.  Write JavaScript code to display the date and time on the webpage.

                  Ans.  <html>

                      <head>
                          <title>Date and Time Display</title>
                      </head>

                      <body text=blue>


                                                                                                    Practical Work   275
   272   273   274   275   276   277   278   279   280   281   282