Learn HTML5 2 with kingdz. Goodbye to audio and video

Source: Internet
Author: User

Don't be surprised, this article.ArticleInstead of talking about bye-bye with these two labels, we can further use these two labels.

Okay. At the beginning of this lesson, the first example is to use js to control the two labels. Oh, by the way, I explained one. These two buddies have very similar functions, everyone else should understand it.

 <!  Doctype  Html  > <  Html  > <  Head  > <  Script  Type  = "Text/JavaScript"> Function Show (){ VaR Video = Document. createelement ('Video' ); Video. src = 'C:/text/1.mp4' ; Video. Controls = True ; Document. Body. appendchild (video );} </  Script  > </  Head  > <  Body  > <  Input  Type  = "Button"  Value  = "Show video" Onclick  = "Show ();"/> <  Body  > </  Html  > This is the script used to create a video object. 
 
 

 

Well, of course we can write it like this.

 <!  Doctype  Html  > <  Html  > <  Body  > <  Video Controls  = "True"  Width  = "320"  Height  = "240"> This label is not supported. </  Video  > <  Input  Type  = "Button"  Value  = "Loading videos"  Onclick  = "Document. getelementsbytagname ('video') [0]. src = 'C:/text/1.mp4 '"/> < Body  > </  Html  > 

Okay, huh, can this be written to dynamically load your own video files?

Developed by HTML5CodeMore diverse formats, you can

Use the following three formats to write HTML5 code.

 
<Video loop>
 
<Video loop = "">
 
<Video loop = "loop">
 
 
 
The above three codes are correct.

Of course, you can also label the video and write your own start and end.

 <!  Doctype  Html  > <  Html > <  Head  > </  Head  > <  Body  > <  Video  Controls  = "True"  Width  = "320"  Height  = "240"> This label is not supported. </  Video  > < Input  Type  = "Button"  Value  = "Loading videos"  Onclick  = "Document. getelementsbytagname ('video') [0]. src = 'C:/text/1.mp4 '"/> <  Input  Type  = "Button"  Value  = "Playing"  Onclick  = "Document. getelementsbytagname ('video') [0]. Play ()"/> <  Input  Type = "Button"  Value  = "Suspend"  Onclick  = "Document. getelementsbytagname ('video') [0]. Pause ()"/> <  Body  > </  Html  > Of course, you can also create a scroll bar effect. [Own scroll bar] 
 
<InputType= "Range"Step= "Any"ID= "Seekbar"/>

Here, I will not implement it for you, that is, using Js for control.

We can also implement fast release and slow release.

 

Next, I will give you some things that I think are good at the HTML5 instance time.

 

First

 
<ButtonClass= "Play"Title= "Play">& # X25ba;</Button/>

Let's see what the situation is. Haha

Then

<ButtonClass= "Play"Title= "Play">& # X2590; & # x2590;</Button/>

Haha. You are welcome to share with me the usage of these two labels. Goodbye.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.