web

parent 634f678a
This diff is collapsed.
{
"name": "windowapp",
"version": "1.0.0",
"description": "",
"main": "main.js",
"scripts": {
"echo": "echo สวัสดี"
},
"keywords": [
""
],
"author": "seksit",
"license": "ISC",
"devDependencies": {
"electron": "1.8.2"
}
}
This diff is collapsed.
This diff is collapsed.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
div {
width: 100%;
height: 800px;
background: url("image/background.png");
background-size: cover;
}
</style>
</head>
<body background = "image/background.jpg">
<div>
<center> <img src="image/1.png" alt=""></center><br><br><br>
<center><img src="image/1.jpg" alt="" width="400px"></center><br><br>
<a href="question.html">
<center> <img src="image/2.png"></center>
</a>
</div>
<script>
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
div {
width: 100%;
height: 800px;
background: url("image/background.png");
background-size: cover;
}
</style>
</head>
<body background = "image/background.jpg">
<div>
<center> <img src="image/1.png" alt=""></center><br><br><br>
<center><img src="image/1.jpg" alt="" width="400px"></center><br><br>
<a href="question.html">
<center> <img src="image/2.png"></center>
</a>
</div>
<script>
</script>
</body>
</html>
const {app, BrowserWindow} = require('electron')
const path = require('path')
const url = require('url')
let win;
function createWindow() {
win = new BrowserWindow({width: 800, height: 600})
win.loadURL(url.format({
pathname: path.join(__dirname, 'index.html'),
protocol: 'file:',
slashes: true
}))
win.on('closed', () => {
win = null
})
}
app.on('ready', createWindow)
This diff is collapsed.
{
"name": "windowapp",
"version": "1.0.0",
"description": "",
"main": "main.js",
"scripts": {
"app": "/home/lab1-32/node_modules/electron/dist/electron .",
"echo": "echo สวัสดี"
},
"author": "seksit",
"license": "ISC",
"devDependencies": {
"electron-packager": "^11.0.1"
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
div {
width: 100%;
height: 800px;
background: url("image/background.png");
background-size: cover;
}
</style>
</head>
<body background = "image/background.jpg">
<div>
<center><img id="ask"></center><br><br><br>
<center><img id="image"></center><br><br>
<center><img id="a1" onclick="n(1)"></center>
<center><img id="a2" onclick="n(2)"></center>
<center><img id="a3" onclick="n(3)"></center>
<center><img id="a4" onclick="n(4)"></center>
<center><img id="end" width="500px"></center><br><br>
<center><img id="sum"></center>
<a id="b"href="index.html">
<center> <img src="image/b.png"></center>
</a>
</div>
<script src="scripts.js">
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
div {
width: 100%;
height: 800px;
background: url("image/background.png");
background-size: cover;
}
</style>
</head>
<body background = "image/background.jpg">
<div>
<center><img id="ask"></center><br><br><br>
<center><img id="image"></center><br><br>
<center><img id="a1" onclick="n(1)"></center>
<center><img id="a2" onclick="n(2)"></center>
<center><img id="a3" onclick="n(3)"></center>
<center><img id="a4" onclick="n(4)"></center>
<center><img id="end" width="500px"></center><br><br>
<center><img id="sum"></center>
<a id="b"href="index.html">
<center> <img src="image/b.png"></center>
</a>
</div>
<script src="scripts.js">
</script>
</body>
</html>
var x = 1;
var sum = 0;
document.getElementById('end').style.display = 'none';
document.getElementById('sum').style.display = 'none';
document.getElementById('b').style.display = 'none';
if (x == 1) {
document.getElementById('ask').src='image/1/ask.png'
document.getElementById('image').src='image/1/1.png'
document.getElementById('a1').src='image/1/a1.png'
document.getElementById('a2').src='image/1/a2.png'
document.getElementById('a3').src='image/1/a3.png'
document.getElementById('a4').src='image/1/a4.png'
}
function n(number) {
x=x+1;
if(x == 2){
document.getElementById('ask').src='image/2/ask.png'
document.getElementById('image').src='image/2/1.png'
document.getElementById('a1').src='image/2/a1.png'
document.getElementById('a2').src='image/2/a2.png'
document.getElementById('a3').src='image/2/a3.png'
document.getElementById('a4').src='image/2/a4.png'
if (number == 3) {
sum++;
}
}
if (x==3) {
document.getElementById('ask').src='image/3/ask.png'
document.getElementById('image').src='image/3/1.png'
document.getElementById('a1').src='image/3/a1.png'
document.getElementById('a2').src='image/3/a2.png'
document.getElementById('a3').src='image/3/a3.png'
document.getElementById('a4').src='image/3/a4.png'
if (number == 1) {
sum++;
}
}
if (x==4) {
document.getElementById('ask').src='image/4/ask.png'
document.getElementById('image').src='image/4/1.png'
document.getElementById('a1').src='image/4/a1.png'
document.getElementById('a2').src='image/4/a2.png'
document.getElementById('a3').src='image/4/a3.png'
document.getElementById('a4').src='image/4/a4.png'
if (number == 4) {
sum++;
}
}
if (x==5) {
document.getElementById('ask').src='image/5/ask.png'
document.getElementById('image').src='image/5/1.png'
document.getElementById('a1').src='image/5/a1.png'
document.getElementById('a2').src='image/5/a2.png'
document.getElementById('a3').src='image/5/a3.png'
document.getElementById('a4').src='image/5/a4.png'
if (number == 3) {
sum++;
}
}
if (x==6) {
if (number == 1) {
sum++;
}
conclude();
}
}
function conclude() {
document.getElementById('ask').src='image/sum/ask.png'
document.getElementById('image').style.display = 'none';
document.getElementById('a1').style.display = 'none';
document.getElementById('a2').style.display = 'none';
document.getElementById('a3').style.display = 'none';
document.getElementById('a4').style.display = 'none';
document.getElementById('end').style.display = 'inline';
document.getElementById('sum').style.display = 'inline';
document.getElementById('b').style.display = 'inline';
document.getElementById('end').src='image/2.jpg'
if (sum == 0) {
document.getElementById('sum').src='image/sum/0.png'
}
if (sum == 1) {
document.getElementById('sum').src='image/sum/1.png'
}
if (sum == 2) {
document.getElementById('sum').src='image/sum/2.png'
}
if (sum == 3) {
document.getElementById('sum').src='image/sum/3.png'
}
if (sum == 4) {
document.getElementById('sum').src='image/sum/4.png'
}
if (sum == 5) {
document.getElementById('sum').src='image/sum/5.png'
}
}
var x = 1;
var sum = 0;
document.getElementById('end').style.display = 'none';
document.getElementById('sum').style.display = 'none';
document.getElementById('b').style.display = 'none';
if (x == 1) {
document.getElementById('ask').src='image/1/ask.png'
document.getElementById('image').src='image/1/1.png'
document.getElementById('a1').src='image/1/a1.png'
document.getElementById('a2').src='image/1/a2.png'
document.getElementById('a3').src='image/1/a3.png'
document.getElementById('a4').src='image/1/a4.png'
}
function n(number) {
x=x+1;
if(x == 2){
document.getElementById('ask').src='image/2/ask.png'
document.getElementById('image').src='image/2/1.png'
document.getElementById('a1').src='image/2/a1.png'
document.getElementById('a2').src='image/2/a2.png'
document.getElementById('a3').src='image/2/a3.png'
document.getElementById('a4').src='image/2/a4.png'
if (number == 3) {
sum++;
}
}
if (x==3) {
document.getElementById('ask').src='image/3/ask.png'
document.getElementById('image').src='image/3/1.png'
document.getElementById('a1').src='image/3/a1.png'
document.getElementById('a2').src='image/3/a2.png'
document.getElementById('a3').src='image/3/a3.png'
document.getElementById('a4').src='image/3/a4.png'
if (number == 1) {
sum++;
}
}
if (x==4) {
document.getElementById('ask').src='image/4/ask.png'
document.getElementById('image').src='image/4/1.png'
document.getElementById('a1').src='image/4/a1.png'
document.getElementById('a2').src='image/4/a2.png'
document.getElementById('a3').src='image/4/a3.png'
document.getElementById('a4').src='image/4/a4.png'
if (number == 4) {
sum++;
}
}
if (x==5) {
document.getElementById('ask').src='image/5/ask.png'
document.getElementById('image').src='image/5/1.png'
document.getElementById('a1').src='image/5/a1.png'
document.getElementById('a2').src='image/5/a2.png'
document.getElementById('a3').src='image/5/a3.png'
document.getElementById('a4').src='image/5/a4.png'
if (number == 3) {
sum++;
}
}
if (x==6) {
if (number == 1) {
sum++;
}
conclude();
}
}
function conclude() {
document.getElementById('ask').src='image/sum/ask.png'
document.getElementById('image').style.display = 'none';
document.getElementById('a1').style.display = 'none';
document.getElementById('a2').style.display = 'none';
document.getElementById('a3').style.display = 'none';
document.getElementById('a4').style.display = 'none';
document.getElementById('end').style.display = 'inline';
document.getElementById('sum').style.display = 'inline';
document.getElementById('b').style.display = 'inline';
document.getElementById('end').src='image/2.jpg'
if (sum == 0) {
document.getElementById('sum').src='image/sum/0.png'
}
if (sum == 1) {
document.getElementById('sum').src='image/sum/1.png'
}
if (sum == 2) {
document.getElementById('sum').src='image/sum/2.png'
}
if (sum == 3) {
document.getElementById('sum').src='image/sum/3.png'
}
if (sum == 4) {
document.getElementById('sum').src='image/sum/4.png'
}
if (sum == 5) {
document.getElementById('sum').src='image/sum/5.png'
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment