提交 e524a514 编写于 作者: 2 2301_76800117

Sun Sep 10 09:05:00 CST 2023 inscode

上级 7f0725f0
<!DOCTYPE html>
<html>
<head>
<title>Event Bubbling Example</title>
<style>
.parent {
padding: 20px;
background-color: gray;
}
.child {
padding: 20px;
background-color: green;
color: white;
}
</style>
</head>
<body>
<div class="parent" onclick="alert('Parent is clicked');">
<div class="child" onclick="event.stopPropagation(); alert('Child is clicked');">Child</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>登录页面</title>
......
function bubbleSort(arr) {
var len = arr.length;
for (var i = 0; i < len - 1; i++) {
for (var j = 0; j < len - 1 - i; j++) {
if (arr[j] > arr[j + 1]) {
var temp = arr[j];
arr[j] = arr[j + 1];
arr[j + 1] = temp;
}
}
}
return arr;
}
// 测试
var arr = [5, 3, 8, 4, 1];
console.log(bubbleSort(arr)); // [1, 3, 4, 5, 8]
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册