setInterval(timeRun, 1000);
// Запускаем и одновременно запоминаем id запущенной операции
var timerId = setInterval(timeRun, 1000);
...
// Останавливаем
clearInterval(timerId);
/(<i[^>]*><i>).*/ig;
The + operator doesn't change the sign of the value, and the - operator does change the sign. The outcome of both operators depend on the sign of the original value, neither operator makes the value positive or negative regardless of the original sign.
function posttext() {
...
data:{
text: $('#text').val(),
sender: 1,
thread: 1,
}
function check() {
...
date:{
thread:1
messages: $("#chatul")
}
var a = '1,2,3,4,5';
b = a.replace(/\d/g, function(n){if (n == '1') {return 3} else if (n == '3') {return 2} else if (n == '2') {return '4'} else {return n}});
>> "3,4,2,4,5"
var iframe = document.getElementsByTagName('iframe')[0];
var insideDoc = iframe.contentDocument;
var insideDocTestElem = insideDoc.getElementById('test');