随笔分类 -  javascript

javascript
摘要:/** 队列*/Dare.Queue = function () { this.list = new Dare.LinkedList();//链表};Dare.extend(Dare.Queue, Dare);/** 入队*/Dare.Queue.prototype.enQueue = function (data) { if (data == null) return; var linkedListNode = new Dare.LinkedListNode(); linkedListNode.data = data; this.list.appendNode(linkedListNode) 阅读全文
posted @ 2011-10-31 10:32 火腿骑士 阅读(488) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/zsk526/archive/2011/10/23/2221962.html关于进制转换,我们用到的有十进制和十六进制(颜色)。任何进制(2到36)转10进制 使用parseInt1 parseInt('FF',16) // 2552 parseInt('FF',36) // 55510进制转任何进制(1到36)使用toStringvar i = 255;i.toString(10) //"255"i.toString(16) //"FF"i.toString(36) //&q 阅读全文
posted @ 2011-10-28 09:33 火腿骑士 阅读(161) 评论(0) 推荐(0)
摘要:上实战代码:linkedlistnode.js 节点类/** 链表节点*/Dare.LinkedListNode = function () { this.data = null;//数据域 this.prev = null;//前驱 this.next = null;//后驱};Dare.extend(Dare.LinkedListNode, Dare);Dare.LinkedListNode.prototype.getValue = function () { return this.data;};Dare.LinkedListNode.prototype.setValue = func. 阅读全文
posted @ 2011-10-27 17:59 火腿骑士 阅读(388) 评论(0) 推荐(1)
摘要:var KeyMap = (Dare.isiE || Dare.isFirefox) ? { STB_KEY_LEFT: 52, // '4' STB_KEY_UP: 56, // '8' STB_KEY_RIGHT: 54, // '6' STB_KEY_DOWN: 50, // '2' STB_KEY_ENTER: 13, // 'enter' STB_KEY_HOME: 55, // '7' STB_KEY_STOP: 120, // 'x' STB_KEY_USB_INSER 阅读全文
posted @ 2011-08-20 16:24 火腿骑士 阅读(244) 评论(0) 推荐(0)
摘要:Dare.InitSetting = function () { this.className = 'Dare.InitSetting'; this.stylePath = '../style/default/'; this.currentFocus = 'menu_item1'; this.currentMenuIndex = 1; //当前菜单焦点位置 this.menuIndex = 0; //当前菜单在数组中索引位置 this.menuCount = 3; //菜单总数 this.menuArray = ['视频设置', 阅读全文
posted @ 2011-08-20 16:19 火腿骑士 阅读(347) 评论(0) 推荐(0)
摘要:/*** Dare Movie Object.* @constructor*///声明构造函数 构造函数初始化变量Dare.Movie = function() { this.parent = new Dare.Util(); this.className = "Dare.Movie"; //----类Dare.Movie全局属性变量-----// this.stylePath = dareStyle.getStylePath(); this.pageIndex = 0; //当前页索引 this.pageTotal = 0; //总页数; this.pageSize = 阅读全文
posted @ 2011-08-20 16:13 火腿骑士 阅读(399) 评论(4) 推荐(0)
摘要:/*** Dare mediaplayer Object.* @constructor*///声明构造函数 构造函数初始化变量Dare.MediaPlayer = function () { this.parent = new Dare.Util(); this.className = "Dare.MediaPlayer"; //----类Dare.MediaPlayer全局属性变量-----// this.playPath = ''; //媒体播放路径 this.playType = 0; //媒体类型 movie、music、pic this.playM 阅读全文
posted @ 2011-08-20 16:11 火腿骑士 阅读(1503) 评论(6) 推荐(2)