`

prototype---(待补)

阅读更多
<html>
<body>

<script type="text/javascript">

function employee(name,job,born)
{
this.name=name;
this.job=job;
this.born=born;
}

var bill=new employee("Bill Gates","Engineer",1985);

employee.prototype.salary=null;
bill.salary=20000;

document.write(bill.job,bill.salary);

</script>

</body>
</html>


MapManager.prototype.BindLayerClick = function(layer,func){
	if(!layer){
		console.log("Bind layer is null");
		return;
	}
	dojo.connect(layer,"onClick",function(evt){
	    if(func && func instanceof Function){
	    	func(evt.graphic.attributes);
	    }
	});
};
mapManager.BindLayerClick(layerControl.getLayer("interchange"),interchangeOnClick;
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics