최근에 사용하고 싶기 때문에 온라인으로 찾았지만 아직 시도하지 않았습니다.
코드 사본은 다음과 같습니다.
<! 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">
<헤드>
<meta http-equiv = "content-type"content = "text /html; charset = gb2312" />
<title> 제목의 문서 </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">
</객체>
</p>
<입력 이름 = "제출"유형 = "제출"onclick = "getInfo ()">
<p>
<script language = "javaScript">
var 시간;
함수 getInfo () {
var pl = document.getElementById ( "플레이어");
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 (0,2)*60)+parseint (pl.currentmedia.durationstring.substring (3,5)));
}
</스크립트>
</p>
</body>
</html>