aaaa
This commit is contained in:
41
teaching/林锦绣/duixiang.html
Normal file
41
teaching/林锦绣/duixiang.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
var obj={
|
||||
shopname:"西红柿",
|
||||
price:1.00,
|
||||
kucun:"30个",
|
||||
chandi:"寿光",
|
||||
eat:function(){
|
||||
console.log("我可以被生吃")
|
||||
},
|
||||
cook:function(){
|
||||
console.log("可以炒着吃")
|
||||
},
|
||||
zhazhi:function(){
|
||||
console.log("我可以被榨汁")
|
||||
}
|
||||
}
|
||||
console.log(obj)
|
||||
obj.eat()
|
||||
obj.cook();
|
||||
obj.zhazhi();
|
||||
console.log(obj.shopname);
|
||||
|
||||
obj.gaoguang=function(){
|
||||
console.log("火山下大雪")
|
||||
}
|
||||
obj.gaoguang()
|
||||
obj.shopname="火山"
|
||||
delete obj.kucun
|
||||
console.log(obj)
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user