You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
768 B
40 lines
768 B
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Document</title>
|
|
<style>
|
|
img{
|
|
width: 100%;
|
|
}
|
|
.image{
|
|
width: 100px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div>aaa</div>
|
|
<embed src="Ic-筋膜枪-放松.svg" width="300" height="300" type="image/svg+xml">
|
|
</body>
|
|
<script>
|
|
let obj = {
|
|
a: {
|
|
b: {
|
|
c: 1
|
|
}
|
|
}
|
|
}
|
|
|
|
Object.defineProperty(obj.a.b, 'c', {
|
|
set(val){
|
|
console.dir(val)
|
|
}
|
|
})
|
|
|
|
let div = document.getElementsByTagName('div')[0]
|
|
div.onclick = function(){
|
|
obj.a.b.c = 2
|
|
}
|
|
</script>
|
|
</html>
|