@ harleydk -
You codes works well! I can refresh my temperature value without refreshing complete webpage now. Thank you very much!!!
But I still have a problem after inserting a picture in webpage, the webpage seems always loading. The picture on the webpage works not well.
how can I let the picture stay fixed , I only want to refresh the temperature value, I don’t want to see the situation that webpage is always loading, if I run my webpag (see picture).
the html file is as follow, I have only insert a image and CSS file in the html file.
<!DOCTYPE html>
<html>
<head>
<title>Temperature test page</title>
<link rel="stylesheet" type="text/css" href="index_styling.css" />
<img src="TYP400102.bin" alt="TYP400102" width="100" height="100">
<!--Load jquery for ajax functionality-->
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
// The code in our 'ready' function runs when the page has loaded
$(document).ready(function () {
// We'll use the windows-object's setInterval function to run our update code very 5000 milliseconds
window.setInterval(function () {
// We'll use the jquery ajax $get function to retrieve our data from the data file
$.get('data.txt', function (data) {
..............................................................
.................................................................
....................................................................