ฉันพบว่ามันออนไลน์เพราะฉันต้องการใช้มันเมื่อเร็ว ๆ นี้ แต่ฉันยังไม่ได้ลอง
การคัดลอกรหัสมีดังนี้:
<! doctype html public "-// w3c // dtd xhtml 1.0 transitional // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv = "content-type" content = "text /html; charset = gb2312" />
<tite> เอกสารชื่อ UNT </title>
</head>
<body>
<p>
<object id = "player" style = "display: none" classid = "clsid: 6bf52a52-394a-11d3-b153-00c04f79faa6">
<param name = "InvokeUrls" value = "-1">
<param name = "autostart" value = "-1">
<param name = "currentPosition" value = "0">
<param name = 'uimode' value = 'mini'>
<param name = "url" value = "test.mpg">
</ject>
</p>
<ชื่ออินพุต = "ส่ง" type = "ส่ง" onclick = "getInfo ()">>
<p>
<ภาษาสคริปต์ = "JavaScript">
เวลา var;
ฟังก์ชั่น getInfo () {
var pl = document.getElementById ("ผู้เล่น");
เวลา = pl.currentmedia.durationString;
การแจ้งเตือน (ParseInt (Pl.CurrentMedia.DurationString.SubString (0,2)*60));
//alert(parseint(pl.currentmedia.durationString.substring(3,5)));
การแจ้งเตือน (ParseInt (Pl.CurrentMedia.durationString.SubString (0,2)*60)+ParseInt (Pl.CurrentMedia.DurationString.SubString (3,5)));
-
</script>
</p>
</body>
</html>