HTML DOM Source Object

Multi tool use
Multi tool use






<!--
main_leaderboard, all: [728,90][970,90][320,50][468,60]
-->



HTML DOM Source Object



❮ Previous
Next ❯



Source Object HTML5


The Source Object is new in HTML5.


The Source object represents an HTML <source> element.


Access a Source Object


You can access a <source> element by using getElementById():



Example



var x = document.getElementById("mySource");

Try it Yourself »

Create a Source Object


You can create a <source> element by using the document.createElement() method:



Example



var x = document.createElement("SOURCE");

Try it Yourself »

Source Object Properties



















Property Description
media Sets or returns the value of the media attribute in a <source> element
src Sets or returns the value of the src attribute in a <source> element
type Sets or returns the value of the type attribute in a <source> element

Standard Properties and Events


The Source object also supports the standard properties and events.




Related Pages


HTML tutorial: HTML5 Video


HTML tutorial: HTML5 Audio


HTML reference: HTML <source> tag





❮ Previous
Next ❯

4dlGWnmw6,HT4 2c,o,JNKXyBqvjrI,r,RimegNXIBdXizvg11G94wA iS7Tmmd0FcUdZizG5vF GWzp8o4 zgstAdi,QbTfEHWx
O,lyTxsQVKp3erz9 W8dE 5W4ieLO,r8u

Popular posts from this blog

Chat program with C++ and SFML

Function to Return a JSON Like Objects Using VBA Collections and Arrays

Python - Quiz Game with Tkinter