Показать сообщение отдельно
  #5 (permalink)  
Старый 06.03.2022, 06:14
Аспирант
Отправить личное сообщение для leon2009sp Посмотреть профиль Найти все сообщения от leon2009sp
 
Регистрация: 22.12.2015
Сообщений: 97

идея была такой:
идея была такой:
function readTextFile(file)
{
var rawFile = new XMLHttpRequest();
rawFile.open("GET", file, false);
rawFile.onreadystatechange = function ()
{
if(rawFile.readyState === 4)
{
if(rawFile.status === 200 || rawFile.status == 0)
{
var allText = rawFile.responseText;
document.getElementById("output").innerHTML=allText;

function first() {
document.getElementById("second_hide"+i*filecount).setAttribute("style", "opacity:1; transition: 1s; height: 100%;");
document.getElementById("first"+i*filecount).setAttribute("style","display: none");
document.getElementById("first_yelloy"+i*filecount).setAttribute("style","display: block");
}
function first_yelloy() {
document.getElementById("second_hide"+i*filecount).setAttribute("style","display: none");
document.getElementById("first_yelloy"+i*filecount).setAttribute("style","display: none");
document.getElementById("first"+i*filecount).setAttribute("style","display: block");
}


}
}
}
rawFile.send(null);
}
Ответить с цитированием