html, body { /* обязательно сразу для html и body */
scroll-behavior: smooth;
}
import { FileService } from './../services/file.service';
import { Controller, Get, Param, Res } from "@nestjs/common";
@Controller("/files")
export class FilesController {
constructor (private fileService: FileService) {}
@Get("/:filename")
async getFile(@Param("filename") filename: string, @Res() res: any) {
res.sendFile(filename, { root: 'static/image'});
}
}
let isBtn1Clicked = false;
button1.addEventListener('click', () => isBtn1Clicked = true);
button2.addEventListener('click', () => {
if (isBtn1Clicked) {
// ...
}
});
button1.addEventListener('click', e => e.target.classList.add('clicked'));
button2.addEventListener('click', () => {
if (button1.classList.contains('clicked')) {
// ...
}
});
button2.disabled = true;
button1.addEventListener('click', () => button2.disabled = false);
button2.addEventListener('click', () => {
// ...
});
button2.hidden = true;
button1.addEventListener('click', () => button2.hidden = false);
button2.addEventListener('click', () => {
// ...
});
button1.addEventListener('click', () => {
button2.addEventListener('click', () => {
// ...
});
}, { once: true });
$content = array('абвгд', 'abcdefg', '12345');
echo json_encode($content);
alert($.parseJSON(data));
<html>
<head>
<meta charset="utf-8">
</head>
...
</html>
Collation: utf8_general_ci
$i=0;
while ($i < $count) {
// тут отправляем запрос:
// offset - $i
// count - 100
$i+=100;
}