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代码我很多都看不懂,现在我做java前端开发,javaScript是非常重要的,现在我决定重新拾起《JavaScript高级程序设计》学习,成为一个javaScript能手。
看完第一章我到还是搞不明白DOM的意思。
......
问:
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.
......
<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 ......
1.HTML文档树形表示
2.Node[] Node.childNodes
//返回Node对象的所有字节点
3.Node.firstChild / lastChild /nextSibling(下一个兄弟节点) / previousSibling (上一个兄弟节点) / parentNode
属性
4.Node.appendChild() / removeChild() / replaceChil ......
你知道世界上有多少种浏览器吗?除了我们熟知的IE, Firefox, Opera, Safari四大浏览器之外,世界上还有近百种浏览器。
几天前,浏览器家族有刚诞生了一位小王子,就是Google推出的Chrome浏览器。由于Chrome出生名门,尽管他还是个小家伙,没有人敢小看他。以后,咱们常说浏览器的&ld ......