易截截图软件、单文件、免安装、纯绿色、仅160KB

Javascript Windows MediaPlayer完整示范版

一、主页面(采用jsp实现)
<%@ page language="java" contentType="text/html; charset=gb2312"
pageEncoding="gb2312"%>
<%@page import="org.accp.jwebplayer.biz.MusicBiz"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Insert title here</title>
<mce:script type="text/javascript"><!--

//保存当前播放曲目在列表中的索引
var index = 0;
//var timer = null;
function $(oid){
return document.getElementById(oid);
}

//到指定位置播放
function playposition() {
$('wmp').controls.currentPosition = parseFloat($("position").value);
$("position").value = "1.0";
}

function showMusicInfo(){
$('spnCurrentMediaName').innerText = $('wmp').currentMedia.name;
$('spnCurrentMediaDuration').innerText = $('wmp').currentMedia.durationString;
$('spnCurrentMediaWidth').innerText = $('wmp').currentMedia.imageSourceWidth;
$('spnCurrentMediaHeight').innerText = $('wmp').currentMedia.imageSourceHeight;
$('spnCurrentMediaMarkerCount').innerText=$('wmp').currentMedia.markerCount;
$('spnCurrentSourceURL').innerText = $('wmp').currentMedia.sourceURL;
}

//下一首
function next(){
if (index<$('playList').options.length-1){
index++;
$('wmp').URL=$('playList').options[index].value;
$('playList').selectedIndex=index;
showMusicInfo();
}
}



//上一首
function pre(){
if (index>0){
index--;
$('wmp').URL=$('playList').options[index].value;
$('playList').selectedIndex=index;
showMusicInfo();
}
}

//检查播放器的状态
//function checkState(){

// if ($('wmp').playState==1){
// n


相关文档:

JavaScript中访问C#变量及方法

1.如何在javascript访问C#变量
方法一:使用<%=%>
 <input id="Button3" type="button" value="js调用c#变量" onclick="return Button3_onclick()" />
function Button3_onclick()
{        
    alert('我的名字:'+ '<%=name %>'); ......

JavaScript中confirm的用法

confirm函数 
confirm函数用于提供确认功能,它首先显示给定的message参数所包含的信息,并提供两个可选择的回答“ok”和“cancel”,然后等待用户选择其中的一个。如果用户选择“ok”则返回true;否则,如若选择“cancel”则返回false。该函数的语法格式如下:
window.con ......

Javascript和AS相互交互调用 Re

一个公用类:flash.external.ExternalInterface;
该类有两个相关方法:
1、调用javascript函数;
ExternalInterface.call(´js函数名´[,以逗号隔开的多个参数]);
其中js函数名为在javascript中申明的函数名称,
传递的参数可以是as中任何类型的数据,这些参数将被自动转换成js变量;
2、注册js中可用的回 ......

JavaScript判断浏览器类型及版本

你知道世界上有多少种浏览器吗?除了我们熟知的IE, Firefox, Opera, Safari四大浏览器之外,世界上还有近百种浏览器。
       几天前,浏览器家族有刚诞生了一位小王子,就是Google推出的Chrome浏览器。由于Chrome出生名门,尽管他还是个小家伙,没有人敢小看他。以后,咱们常说浏览器的&ld ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号