x
1
2
<html>
3
<head>
4
<meta charset="utf-8">
5
<title>蜜蜂教程(mifengjc.com)</title>
6
<script>
7
function myFunction() {
8
document.getElementById("demo").innerHTML = "Hello World";
9
}
10
</script>
11
</head>
12
<body>
13
14
<p ondblclick="myFunction()">双击这段触发一个函数</p>
15
16
<p id="demo"></p>
17
18
</body>
19
</html>