我的时间不多,大部分是在工作之余写的。
JObj.Dom.$tag("INPUT")
.$filter(function(o){
var fa = o.parentNode.parentNode.parentNode;
return f =( o.type == "text" && fa.id == "hollerNew") ? true : false;
})
.$css({width:"570px",height:"18px",lineHeight: "18px"})
.$attr({className:"hollerFormNormal"})
.$event({
onfocus:"vControl('TEXTFOCUS',this)",
onblur:" vControl('TEXTBLUR',this)"
})
.$tag("TEXTAREA")
.$css({width:"570px",height:"100px",lineHeight:"18px" })
.$attr({className:"hollerFormNormal"})
.$event({
onfocus:"vControl('TEXTFOCUS',this)",
onblur:"vControl(' TEXTBLUR',this)"
})
.$(document.hollerNew)
.$event({
onsubmit:function(){
return JObj.FormValidate.$validate(this ,规则);
}
});
JObj.Dom.$(窗口)
.$event({
onscroll:"vControl('FIXTOOLBAR')"
});
var vControl = function(pChoice){
var args = 参数;
switch(pChoice){
case "BACKER":
var backer = args[1];
var id = args[2];
休息;
case “花”:
var id = args[1];
休息;
case "EGGS":
var id = args[1];
休息;
case "TEXTFOCUS":
args[1].className = "hollerFormFocus";
休息;
case "TEXTBLUR":
args[1].className = "hollerFormNormal";
休息;
案例“SHOWTIP”:
var o,t;
switch(args[3]){
case "FLOWER":
o = "hollerTip_flower_";
t = “鲜花 ” args[2] “ 朵,送他/她一朵,让她开花店!”
break;
case "EGG":
o = "hollerTip_egg_";
t = “鸡蛋 ” args[2] “一枚,如果你怕不够孵出小鸡,你就给他/她一枚!”
break;
默认:
返回;
}
JObj.Dom.$(o args[1])
.$attr({innerHTML:t})
.$css({display:"",position: "相对"})
.$show("快",
{宽度:0,高度:0},
{宽度:400,高度:18}
);
休息;
案例“HIDETIP”:
var o;
switch(args[2]){
case "FLOWER": o = "hollerTip_flower_";break;
case "EGG": o = "hollerTip_egg_";break;
默认:返回;
}
JObj.Dom.$(o args[1])
.$hide("快");
休息;
case "FIXTOOLBAR":
JObj.Dom.$("toolBar")
.$css({opacity:0.1,filter:"Alpha(Opacity=10)"})
.$ moveToScrollTop(“快”);
休息;
}
}