I found it online because I recently used it, but I have not tried it.
Copy codeThe Code is as follows:
<! 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"/>
<Title> untitled document </title>
</Head>
<Body>
<P>
<Object id = "player" style = "display: none" height = "400" width = "400" 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>
<Input name = "submit" type = "submit" onclick = "getInfo ()">
<P>
<Script language = "javascript">
Var time;
Function getInfo (){
Var pl = document. getElementById ("player ");
Time = pl. currentMedia. durationString;
Alert (parseInt (pl. currentMedia. durationString. substring (0, 2) * 60 ));
// Alert (parseInt (pl. currentMedia. durationString. substring (3, 5 )));
Alert (parseInt (pl. currentMedia. durationString. substring () * 60) + parseInt (pl. currentMedia. durationString. substring )));
}
</Script>
</P>
</Body>
</Html>