<html>
<head>
<link rel='stylesheet' type='text/css' href='css/style.css'>
<base href='http://150.20.1.30'><base target='_self'>
<title>PLC</title>
<script>
function change(pic){
element_buts=document.getElementById("pic");
element_buts.src=pic;
}
</script>
</head>
<body>
<div class='content'>
<div class='left'>
<img src='1.jpg' height='80%' id='pic'>
</div>
<div class='right'>
<input type='button' class='buttons' value='PLC' onclick='change("1.jpg")'></br>
<input type='button' class='buttons' value='Furnace Draft' onclick='change("9.jpg")'></br>
<input type='button' class='buttons' value='Drum Level Graph' onclick='change("3.jpg")'></br>
<input type='button' class='buttons' value='Boiler Blowdown Time Setup' onclick='change("10.jpg")'></br>
<input type='button' class='buttons' value='Steam Press and Flow Graph' onclick='change("4.jpg")'></br>
<input type='button' class='buttons' value='Boiler Drum and Dearator Level' onclick='change("5.jpg")'></br>
<input type='button' class='buttons' value='Stack and Dearator Temperature' onclick='change("7.jpg")'></br>
<input type='button' class='buttons' value='Steam Flow and Pressure Graphs' onclick='change("8.jpg")'></br>
<div class='footer_right'>
</div>
</div>
</div>
</body>
</html>
以上是我的 html 和 javascript 代码 我对该函数的引用是http://www.w3schools.com/js/tryit.asp?filename=tryjs_lightbulb当您单击按钮时,此代码上的内容<div class='right'>
将在之前更改函数的值change()
,我的问题是我需要放置什么代码或函数以使图像刷新或自动刷新,示例我最后单击 PLC 按钮,我需要连续刷新以便 1.jpg pic 显示更新的图像. thx 对不起,我是 java 脚本中的新手 thx