Posts by Kadu Krause • 73 points
2 posts
-
6
votes3
answers68
viewsQ: regex Return false?
console.log(rule); // rule = max18 // rule = max120 // rule = max6 var pattMax = new RegExp('^(max).(\d{1,3})'); pattMax.test(rule); //false? if(pattMax.test(rule)){ console.log('é max seguido de 1…
-
1
votes2
answers92
viewsQ: Javascript Xmlhttprequest Scope Function
function getMensages(){ var xhr = new XMLHttpRequest(); xhr.open('GET', '../mensagens.php'); xhr.send(); xhr.onload=function(){ if (xhr.readyState==4 && xhr.status==200){ jsonText =…