当我单击记录按钮时,我有以下脚本开始运行。我想在单击记录按钮时显示图像,这与我们上传图像时通常显示的相同...这是脚本:
<script>
function st()
{
if (window.XMLHttpRequest)
{
xmlhttp=new XMLHttpRequest();
}
else
{
xmlhttp=new ActiveXObject('Microsoft.XMLHTTP');
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
alert('RECORDING Start');
}
}
xmlhttp.open('GET','http://localhost/IPCAM/start.php;)
xmlhttp.send();
setTimeout('st()',5000);
}
</script>
当我单击此按钮时,该按钮将启动 ajax 后台。
<button OnClick="st()">Record</button>
我不知道这样做,请有人帮助我。