記録ボタンをクリックすると実行を開始する次のスクリプトがあります。画像をアップロードするときに通常表示されるものと同じ記録ボタンをクリックしたときに画像を表示したい...これはスクリプトです:
<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>
誰かが私を助けてください。