Specify URL of Resource in HTML Object

Sreemaha
Updated on 03-Mar-2020 09:40:41

163 Views

Use the data attribute in HTML to specify the URL of the resource to be used by the object in HTML.ExampleYou can try to run the following code to implement the data attribute −           Demonstration                

Include Audio and Video Controls in HTML

Nancy Den
Updated on 03-Mar-2020 09:38:51

479 Views

Use the controls attribute in HTML to include audio/ video controls in HTML.ExampleYou can try to run the following code to implement the controls attribute −           HTML video Tag               Online Compiler                                This browser doesn't support video tag.          

Get Value of http-equiv or name Attribute in HTML

Abhinanda Shri
Updated on 03-Mar-2020 09:38:01

145 Views

Use the content attribute in HTML to get the value associated with http-equiv or name attribute.ExampleYou can try to run the following code to implement the content attribute −                         This is demo text.    

Execute Script on User Input in HTML Search Field

Ankith Reddy
Updated on 03-Mar-2020 09:37:13

201 Views

Use the onsearch attribute in HTML to execute a script when the user writes in a search field and press ENTER or x.ExampleYou can try to run the following code to implement the onsearch attribute −           Search something and press ENTER.             Note: It won' work in Internet Explorer and Firefox.                      function display() {          var a = document.getElementById("inputID");          document.getElementById("test").innerHTML = "Searched for - " + a.value;          }          

Execute Script When Element's Scrollbar is Scrolled in HTML

usharani
Updated on 03-Mar-2020 09:36:30

201 Views

When an element is scrolled, the onscroll attribute triggers. You can try to run the following code to implement onscroll attribute −Example                    #myid {             width   : 250px;             height  : 80px;             border  : 2px solid blue;             overflow: scroll;          }                     Scroll the box.       This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text.                      function display() {             document.getElementById("myid").style.color = "blue";          }          

Execute Script When Reset Button is Clicked in HTML

Govinda Sai
Updated on 03-Mar-2020 09:25:31

253 Views

When a form is reset, the onreset attribute triggers. You can try to run the following code to implement onreset attribute −Example                    Student Name:                              Student Subject:                                                    function display() {             alert("Form reset successfull!");          }          

Different Compilation Modes of a Module in Java 9

raja
Updated on 03-Mar-2020 08:35:30

272 Views

A module is a container of packages and each module contains a module descriptor that includes module name, module dependencies,  it means that the name of other modules depends on and name of the packages it exports that can be used only by modules that depend on it.module com.tutorialspoint.app {    /** Modules upon which the module com.tutorialspoint.app depends on */    requires com.tutorialspoint.services;    /** Packages exposed by this module which can be used by other modules */    exports com.tutorialspoint.app.util; }There are three different compilation modes provided by Java 9 Module: Legacy mode, single module mode, and multi-module mode.Compilation modes of ... Read More

Execute Script When Media is Paused in HTML

George John
Updated on 03-Mar-2020 07:44:55

179 Views

The onpause attribute trigger when the media is paused. You can try to run the following code to implement the onpause attribute −Example           Play                                    Your browser does not support the video element.                      function myFunction() {          document.getElementById("test").innerHTML = "Media paused!";          }          

Execute Script on Mouse Wheel Events in HTML

varun
Updated on 03-Mar-2020 07:41:06

145 Views

The onwheel attribute triggers when the mouse wheel rolls up or down over an element. You can try to run the following code to implement onwheel attribute −Example                    This is demo heading.             Click above and use mouse wheel to change the heading color.                function mouseWheel() {             document.getElementById("myid").style.color = "red";          }          

Execute a Script When Media Pauses in HTML

Krantik Chavan
Updated on 03-Mar-2020 07:40:21

131 Views

The onwaiting attribute triggers when a video pause and buffers to reume again. You can try to run the following code to implement the onwaiting attribute −Example           Play                                    Your browser does not support the video element.                      function myFunction() {             document.getElementById("test").innerHTML = "Media resumes again";          }          

Advertisements