Update get-json-with-the-javascript-xmlhttprequest-method.english.md (#34408)

This commit is contained in:
The Coding Aviator
2019-02-06 19:21:59 +05:30
committed by Tom
parent c567d01f6a
commit 536fe28162

View File

@ -36,7 +36,7 @@ tests:
- text: Your code should use the <code>send</code> method to send the request.
testString: assert(code.match(/\.send\(\s*\)/g), 'Your code should use the <code>send</code> method to send the request.');
- text: Your code should have an <code>onload</code> event handler set to a function.
testString: assert(code.match(/\.onload\s*=\s*function\(\s*?\)\s*?{/g), 'Your code should have an <code>onload</code> event handler set to a function.');
testString: assert(code.match(/\.onload\s*=\s*function\s*?\(\s*?\)\s*?{/g), 'Your code should have an <code>onload</code> event handler set to a function.');
- text: Your code should use the <code>JSON.parse</code> method to parse the <code>responseText</code>.
testString: assert(code.match(/JSON\.parse\(.*\.responseText\)/g), 'Your code should use the <code>JSON.parse</code> method to parse the <code>responseText</code>.');
- text: Your code should get the element with class <code>message</code> and change its inner HTML to the string of JSON data.