易截截图软件、单文件、免安装、纯绿色、仅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 , ajax

问:
Hi,
I have this C#/ASP.NET/.aspx page with a string variable named myString with the value "Mario Gamito".
How can I access "Mario Gamito" from within a JavaScript function, i. e., the variable's value ?
Already tried '" + mystring + "' but it doesn't works.
Any help would be appreciated.
......

JavaScript中访问C#变量及方法

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

javascript 打印(人云亦云,我错了)

<html>
<head>
<meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
<title>***WSOFT.NET***</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--media=print 这个属性可以在打印时有效-->
<style ......

[读书笔记][JavaScript权威指南(第四版)][cookie]

//构造函数:用指定的名字和可选的性质为指定的文档创建一个cookie对象。
//参数:
// doucment:保存cookie的Document对象
// name: 指定cookie名的字符串
// hours: Number,指定从现在起到cookie过期的小时数
// path: String,指定cookie的路径性质
// domain: String, 指定cookie的域性质
// secure: Bo ......

javascript split的用法

有时候进行ajax交互的时候,返回的数据可以自己添加分隔符,比如^^^,然后对这些分隔符进行解析,分解为一个数组。
function fill(v) {
if (v == undefined)return false;
var result = v.split("^^^");
$("#cnPatent").val(result[0]);
$("#cnPText").val(result[1]); ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号