yolla.htm
Code:
  
<html>
<head>
<meta charset="utf-8">
<script type="text/javascript">

var nesne ;
if(navigator.appName.search('Microsoft')>-1) { nesne = new ActiveXObject('MSXML2.XMLHTTP'); }
else { nesne = new XMLHttpRequest(); }

function yolla() {
nesne.open('get', 'bilgi.txt', true); 
nesne.onreadystatechange= cevap;
nesne.send(null);
}

function cevap() {
if(nesne.readyState==4) {
var el = document.getElementById('bilgi');
el.innerHTML = nesne.responseText;
}
}

</script>
</head>
<body>
<input type="button" value="bilgi.txt dosyadaki yazıyı buraya al"  onclick="yolla()">

<div id="bilgi"></div>

</body>
</html>
bilgi.txt
Code:
 
5
I clicked the button, it is writing "5" in div

The code I wanted: I clicked the button, it is writing "87" in bilgi.txt
How can I do this?