Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

章志远+第0次作业 #105

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions group1/章志远/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>my first page</title>
<style>
h1 {
color: red;
font-size: 80px;
margin-top: 100px;
}</style>
</head>
<!-- <head>提供源信息 -->
<body>
<h1 id="head">Hello world</h1>
<button id="btn">Plese click me !!!!</button>
<!-- <body>闭合标签写javascript代码 -->
<script>
alert("hello world form zzy")
document.getElementById('head').onclick = function(){
alert("hello world")
// id十分重要,决定后面函数是否会执行
// eg: document.getElementById('head').onclick事件
// 因为前面有<h1 id="head"的唯一标签id>
};
document.getElementById('btn').onclick = function(){
alert("it is ok")
};
document.getElementsByTagName("h1")[0].style.color="blue";
</script>
</body>
</html>