- 前端(Web App) - HTML/CSS/JavaScript
HTML:
html
1000sheng.comHello, World!
Click Me JavaScript (app.js):javascript
document.getElementById(‘myButton’).addEventListener(‘click’, function() {
alert(‘Button clicked!’);
});
CSS (styles.css):
css
body {
font-family: Arial, sans-serif;
text-align: center;
padding-top: 20vh;
}
h1 {
color: #333;
}
2. 后端(Node.js)
使用Express框架:
javascript
const express = require(‘express’);
const app = express();
const port = 3000;
app.get(‘/’, (req, res) => {
res.send(‘Hello from the server!’);
});
app.listen(port, () => {
consol