<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.7.1/dojo/dojo.js"></script>
<script>
var Plant = {};
var Fruit = dojo.mixin(Plant,{
location : 'china',
color : 'red',
toString : function(){
console.log("china red...");
}
});
var Apple = dojo.delegate(Fruit,{
name : 'apple',
color : 'blue',
toString : function(){
console.log("apple blue...");
}
});
console.log(Plant);
console.log(Fruit);
console.log(Apple.color);
console.log(Apple.location);
console.log(Apple.toString());
</script>
</head>
<body class="claro">
</body>
</html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.7.1/dojo/dojo.js"></script>
<script>
var Plant = {};
var Fruit = dojo.mixin(Plant,{
location : 'china',
color : 'red',
toString : function(){
console.log("china red...");
}
});
var Apple = dojo.delegate(Fruit,{
name : 'apple',
color : 'blue',
toString : function(){
console.log("apple blue...");
}
});
console.log(Plant);
console.log(Fruit);
console.log(Apple.color);
console.log(Apple.location);
console.log(Apple.toString());
</script>
</head>
<body class="claro">
</body>
</html>