<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Native Ajax</title>
<script>
function submit() {
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function( ) {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
console.log(xhr.response);
}
}
};
xhr.open('Get', 'http://192.168.1.5:8081/pv',true);
xhr.send();
}
</script>
</head>
<body>
<div style="margin:50px">
<button onclick="submit();">Submit</button>
</div>
</body>
</html>