当前位置 : 主页 > 网页制作 > Dojo >

dojo 常用方法

来源:互联网 收集:自由互联 发布时间:2021-06-15
dojo.addOnLoad(function() {dojo.forEach(dojo.query("span#testButton"),function(x){dojo.connect( x, "onmouseover", null, function(event){x.style.backgroundColor = "green" ;});dojo.connect( x, "onmouseout", null, function(event){x.style.backg
	dojo.addOnLoad(	function() {
		
		dojo.forEach(
			dojo.query("span#testButton")
			,function(x){
				dojo.connect( x
						, "onmouseover"
						, null
						, function(event){x.style.backgroundColor = "green" ;}
				);
				dojo.connect( x
						, "onmouseout"
						, null
						, function(event){x.style.backgroundColor = "" ;}
				);
				dojo.connect( x
						, "onclick"
						, null
						, function(event){ alert('-'); }
				);
				dojo.style( x
					, {
						cursor: "default"
						, border: "1px gray solid"
						, padding: "2px"
						, margin: "3px"
					}
				);
			}
		);
		
		

		
		
	});
网友评论