document.element.style.height
для указания высоты, это свойство нельзя прочитать.getComputedStyle(document.element).height //Вернет высоту
// или так
document.element.offsetHeight
1. Возьмите 2 числа.
2. Поделите одно на другое в столбик на листике.
3. Запишите действия
4. Подумайте над ними
git clone url/to/project
npm i
npm run serve
file.onchange = function(e) {
let str = e.target.value;
res.textContent = str.length > 40 ? str.slice(0, 10) + '...' + str.slice(-10) : str;
}
output: {
publicPath: '/dist/',
// ...
},
historyApiFallback
Примерно так ->devServer: {
historyApiFallback: true,
compress: true,
port: 5000,
index: 'frontpage.html',
open: true,
inline: true,
overlay: true
}
entry: {
messenger: './messenger',
about: './about',
},
// random.js
const min = 1, max = 4;
const number = Math.floor(Math.random() * (max - min) + min);
const script = document.createElement('script');
switch (number) {
case 1: script.src = 'ссылка_1'; break;
case 2: script.src = 'ссылка_2'; break;
// и так далее
}
document.head.appendChild(script);
import java.net.*;
import java.io.*;
public class URLReader {
public static void main(String[] args) throws Exception {
URL oracle = new URL("http://jsonplaceholder.typicode.com/posts");
BufferedReader in = new BufferedReader(
new InputStreamReader(oracle.openStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
in.close();
}
}