Page 107 - COPA VOL II of II - TP -Punjabi
P. 107

<body>                                             ਆਉਟਪੁੱਟ
               <center>

                <h1 onclick=”this.style.color=’blue’”> This is a

                JavaTpoint Site </h1>
               <center>

               </body>

               </html>












            ਟਾਸਕ  6 : DHTML ਇਵੈਂਟਸ
                                                                  ਆਉਟਪੁੱਟ
                           ਰੈਫ ਸਟੈਪ 1 ਤੋਂ 16 - ਟਾਸਕ 1

               <html>
               <head>

               <title>

               Example of onclick event
               </title>

               <script type=”text/javascript”>

               function ChangeText(ctext)
               {

               ctext.innerHTML=” Hi JavaTpoint! “;
                                                                     <html>
               }                                                     <head>

               </script>                                             <title>
                                                                     Example of onsubmit event
               </head>
                                                                     </title>
               <body>                                                </head>

               <font color=”red”>  Click  on the Given text for      <body>
               changing it: <br>                                     <form onsubmit=”Submit_Form()”>
               </font>                                               <label> Enter your name: </label>
                                                                     <input type=”text”>
               <font color=”blue”>                                   <label> Enter your Roll no: </label>

               <h1 onclick=”ChangeText(this)”> Hello World! </h1>       <input type=”Number”>

               </font>                                               <input type=”submit” value=”submit”>
                                                                     </form>
               </body>
                                                                     <script type=”text/javascript”>
               </html>                                               function Submit_Form()

                                      IIT ਅਤੇ ITES : COPA (NSQF - ਸੰਸ਼ੋਭਿਤ 2022) - ਅਭਿਆਸ 1.32.120               93
   102   103   104   105   106   107   108   109   110   111   112