function jss(){
$.ajax({
url: '........................',
type: 'POST',
dataType: 'JSON',
success: function(result){
jss();
}
});
}
jss();
for($i=0;$i<30;$i++){
sleep(1);
/*Основная функция*/
$i++;
if($i == 30){
echo json_encode(array('res' => 'timeout!'));
}
}
"undefined<span class='cls'>Т<span/><span class='cls'>е<span/><span class='cls'>к<span/><span class='cls'>с<span/><span class='cls'>т<span/><span class='cls'>С<span/><span class='cls'>л<span/><span class='cls'>о<span/><span class='cls'>в<span/><span class='cls'>о<span/><span class='cls'>О<span/><span class='cls'>п<span/><span class='cls'>и<span/><span class='cls'>с<span/><span class='cls'>а<span/><span class='cls'>н<span/><span class='cls'>и<span/><span class='cls'>е<span/>"
<div class="block">
<p>Текст</p>
<p>Слово</p>
<p>Описание</p>
</div>
<div class="block">
<p>
<span class="cls">Т</span>
<span class="cls">е</span>
<span class="cls">к</span>
<span class="cls">с</span>
<span class="cls">т</span>
</p>
<p>
<span class="cls">С</span>
<span class="cls">л</span>
<span class="cls">о</span>
<span class="cls">в</span>
<span class="cls">о</span>
</p>
<p>
<span class="cls">О</span>
<span class="cls">п</span>
<span class="cls">и</span>
<span class="cls">с</span>
<span class="cls">а</span>
<span class="cls">н</span>
<span class="cls">и</span>
<span class="cls">е</span>
</p>
</div>
function send(){
let res = client.sendMessage('me', {message: 'Check id'});
res.then(
function(result) { console.log('Id введен верно!') },
function(error) { console.log('Id введен неверно!') }
);
}
send();
function(error) { console.log('Id введен неверно!') }
Не выполняется, если я в поле id введу, допустим 123. require() of ES Module
, при type: commonJs.require is not defined in ES module scope, you can use import instead
This file is being treated as an ES module because it has a '.js' file extension and package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
Cannot find module.