Skip to content

Commit

Permalink
1. localize; 2. remove useless styles
Browse files Browse the repository at this point in the history
  • Loading branch information
roy-tian committed Jul 26, 2022
1 parent 7100c44 commit 0b8fda3
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 96 deletions.
Original file line number Diff line number Diff line change
@@ -1,40 +1,27 @@
<!DOCTYPE html>
<html lang="zh-Hans">
<html lang="zh-CN">
<head>
<meta charset="utf-8"/>
<title>变量:任务1</title>
<style>
p {
color: purple;
margin: 0.5em 0;
}

* {
box-sizing: border-box;
}
</style>
<link rel="stylesheet" href="../styles.css" />
<link rel="stylesheet" href="https://roy-tian.github.io/learning-area/javascript/introduction-to-js-1/tasks/styles.css" />
</head>

<body>

<section class="preview">



</section>
<section class="preview"></section>

</body>
<script>
// 在下方编写代码


// 不要编写此行以下的代码!

const section = document.querySelector('section');

let para1 = document.createElement('p');
const para1 = document.createElement('p');
para1.textContent = myName;
let para2 = document.createElement('p');
const para2 = document.createElement('p');
para2.textContent = myAge;
section.appendChild(para1);
section.appendChild(para2);
Expand Down
25 changes: 6 additions & 19 deletions javascript/introduction-to-js-1/tasks/variables/variables1.html
Original file line number Diff line number Diff line change
@@ -1,31 +1,18 @@
<!DOCTYPE html>
<html lang="zh-Hans">
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<title>变量:任务1</title>
<link rel="stylesheet" href="../styles.css" />
<style>
* {
box-sizing: border-box;
}

p {
color: purple;
margin: 0.5em 0;
}
</style>
</head>

<body>
<section class="preview">


<section class="preview"></section>

</section>
<textarea class="playable playable-js" style="height: 300px;">
// 在下方编写代码

<textarea class="playable playable-js" style="height: 220px;">

// 在下方编写代码

// 不要编写此行以下的代码!

Expand All @@ -42,6 +29,6 @@
<input id="reset" type="button" value="Reset" />
</div>
</body>
<script class="editable"></script>
<script src="../playable.js"></script>
<script defer class="editable"></script>
<script defer src="../playable.js"></script>
</html>
Original file line number Diff line number Diff line change
@@ -1,34 +1,20 @@
<!DOCTYPE html>
<html lang="zh-Hans">
<html lang="zh-CN">
<head>
<meta charset="utf-8"/>
<title>变量:任务2</title>
<style>
p {
color: purple;
margin: 0.5em 0;
}

* {
box-sizing: border-box;
}
</style>
<link rel="stylesheet" href="../styles.css" />
<link rel="stylesheet" href="https://roy-tian.github.io/learning-area/javascript/introduction-to-js-1/tasks/styles.css" />
</head>

<body>

<section class="preview">



</section>
<section class="preview"></section>

</body>
<script>
// 在下方编写代码

let myName = 'Paul';
let myName = '李雷';

// 不要编写此行以下的代码!

Expand Down
20 changes: 3 additions & 17 deletions javascript/introduction-to-js-1/tasks/variables/variables2.html
Original file line number Diff line number Diff line change
@@ -1,33 +1,19 @@
<!DOCTYPE html>
<html lang="zh-Hans">
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<title>变量:任务2</title>
<link rel="stylesheet" href="../styles.css" />
<style>
* {
box-sizing: border-box;
}

p {
color: purple;
margin: 0.5em 0;
}
</style>
</head>

<body>
<section class="preview">



</section>
<section class="preview"></section>

<textarea class="playable playable-js" style="height: 220px;">

// 在下方编写代码

let myName = 'Paul';
let myName = '李雷';

// 不要编写此行以下的代码!

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="zh-Hans">
<html lang="zh-CN">
<head>
<meta charset="utf-8"/>
<title>变量:任务3</title>
Expand Down Expand Up @@ -31,7 +31,7 @@
const myName = 'Default';
myName = '李雷'

let myAge = '42';
let myAge = '18';

// 不要编写此行以下的代码!

Expand Down
27 changes: 6 additions & 21 deletions javascript/introduction-to-js-1/tasks/variables/variables3.html
Original file line number Diff line number Diff line change
@@ -1,45 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<title>变量:任务3</title>
<link rel="stylesheet" href="../styles.css" />
<style>
* {
box-sizing: border-box;
}

p {
color: purple;
margin: 0.5em 0;
}
</style>
</head>

<body>
<section class="preview">



</section>
<section class="preview"></section>

<textarea class="playable playable-js" style="height: 220px;">

// 在下方编写代码


const myName = 'Default';
myName = 'Chris'
myName = '李雷'

let myAge = '42';
let myAge = '18';

// 不要编写此行以下的代码!

section.innerHTML = ' ';
let para1 = document.createElement('p');
let para2 = document.createElement('p');
para1.textContent = myName;
para2.textContent = `In 20 years, I will be ${myAge + 20}`;
para1.textContent = `我是 ${myName}`;
para2.textContent = `20 年后我 ${myAge + 20}`;
section.appendChild(para1);
section.appendChild(para2);
</textarea>
Expand Down

0 comments on commit 0b8fda3

Please sign in to comment.