JavaScript xmlTree
<!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title> JavaScript: xmlTree v1.1 [by Lapuasi.com] </title>
<script type="text/javascript" >
function xmlTree(name) {
this.name = name; //实例名称
this.xmlFile = 'xmltree.xml'; //默认xml文件
this.iconPath = 'images/' //默认图标路径
this.iconFolder = 'tree_icon_folder.gif'; //默认文件夹图标
this.iconFile = 'tree_icon_file.gif'; //默认文件图标
this.iconOpen = 'tree_arrow_open.gif'; //默认箭头展开图标
this.iconOver = 'tree_arrow_over.gif'; //默认箭头活动图标
this.iconClose = 'tree_arrow_close.gif'; //默认箭头关闭图标
this.mode = 0; //初始模式,默认全部关闭。0全部关闭,1全部展开
this.html = ''; //最终输出html代码
this.prevTip = null; //上一次被显示的tip的时间编号 (内部使用)
相关文档:
这个地方就是为什么它的String类型不直接提供一个trim方法呢?
为什么每次都要写这样一句话呢?
String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"");}
这样有意思吗?
JavaScript中规定一个这样的方法会死啊? ......
*------------------------------------------------------
*说明:select元素javascript常用操作
* 1.判断是否存在指定value的Item
* 2.加入一个Item
* 3.删除值为value的所有Item
* 4.删除某一个index的选项
  ......
利用Javascript向页面中插入TABLE,IE下无法正常显示
关键字: table, appendchild, ie, firefox
在项目中偶然遇到一个怪异的问题,我要利用javascript动态的向一个DIV中插入一些个TABLE,Firefox可以正常显示,而在IE下,无论版本是6或7,均无法看到这个TABLE。但是,如果我直接把TABLE的HTML代码写在页面上,一切都能正 ......
web开发中有时需要对输入框中的时间(主要是开始时间和结束时间)进行比较,网上搜索了一番,发现有不少是无效的,以下方法经小弟检验确实有效,特此共享。(请关注红色部分)
function ValidtorTime(){
var d1 = new Date(document.getElementById('txbfromDate').value.replace(/\-/g, "\/"));
var d2 = new Date(do ......
事件源对象
event.srcElement.tagName
event.srcElement.type
捕获释放
event.srcElement.setCapture();
event.srcElement.releaseCapture();
事件按键
event.keyCode
event.shiftKey
event.altKey
event.ctrlKey
事件返回值
event.returnValue
鼠标位置
event.x
event.y
窗体活动元素
d ......