لقد وجدته عبر الإنترنت لأنني أريد استخدامه مؤخرًا ، لكنني لم أجربه بعد
نسخة الكود كما يلي:
<! doctype html public "-// w3c // dtd xhtml 1.0 transitional // en"
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv = "content-type" content = "text /html ؛ charset = gb2312" />
<title> Unted Document </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">
</object>
</p>
<name input = "إرسال" type = "إرسال" onClick = "getInfo ()">
<p>
<script language = "javaScript">
وقت var ؛
وظيفة getInfo () {
var pl = document.getElementById ("player") ؛
الوقت = pl.currentMedia.DurationSstring ؛
ALERT (parseint (pl.CurrentMedia.DurationSstring.SubString (0،2)*60)) ؛
//alert(parseint(pl.currentmedia.durationsstring.substring(3،5)) ؛
ALERT (parseint (pl.currentmedia.durationSstring.SubString (0،2)*60)+parseint (pl.currentmedia.durationSstring.SubString (3،5))) ؛
}
</script>
</p>
</body>
</html>