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


相关文档:

C#中解析javascript代码


大部分的解释型脚本语言都提供 eval 方法来完成动态代码的解释执行, C# 却并不提供(向 Java 学习)。不过在 .NET Framework 类库里面提供的 Microsoft.JScript 命名空间倒是包含了支持使用JScript 语言编译和生成代码的类。
先上代码:
  该类需要你添加对程序集 Microsoft.JScript 的引用;如果把“current v ......

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

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

用javascript评估用户输入密码的强度

javascript评估用户输入密码的强度
密码已经是我们生活工作中必不可少的工具,但一个不安全的密码有又有可能会给我们造成不必要的损失。作为网站设计者,如果我们在网页中能对用户输入的密码进行安全评估,并显示出相应的提示信息,那么对用户设置一个安全的密码将有很大帮助。同时也使得网站更具人性化,更有吸引力.
什么是一 ......

JavaScript 字符串替换和DOM操作技巧


最低一直在写JavaScript,就本人遇到的两个问题以及解决方法给大家分享一下.
1,点击一个按钮,创建一段HTML代码和现有的一模一样,但是里面所有ID的参数和方法里面的参数要改变,参数都是若干个字母+数字组成.新创建出来的HTML代码片段要里面的参数变成字母不变,数字要+1.
如,变之前的代码,
<div id=”testdiv1&rd ......

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

1.HTML文档树形表示
2.Node[] Node.childNodes 
//返回Node对象的所有字节点
3.Node.firstChild  /  lastChild  /nextSibling(下一个兄弟节点)  / previousSibling (上一个兄弟节点)  / parentNode
属性
4.Node.appendChild()  /  removeChild()  /  replaceChil ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号