submit_pdf 按钮将信息保存到数据库中并避免多次单击,我最初在单击后禁用了提交按钮,但是现在我想在超时 10 秒后重新启用该按钮。直到提交按钮被禁用的部分工作正常,但如果我尝试添加 10 秒的延迟,它似乎不起作用。如果你能帮助我解决这个问题,那将非常有帮助。
echo ' <script language="JavaScript" type="text/javascript">
//<![CDATA[
window.open(\'./index_pdf.php?'.$query_string.'\',\'Warehouse_ST\',\'location=no,menubar=no,resizable=yes,scrollbars=yes,status=yes,toolbar=no\');
id_form.submit_pdf.disabled=true;
window.alert("Data is stored in the database, Please do no click on Submit again without changing any information");
window.addEvent(\'domready''\',function()
{
var subber = $_REQUEST["submit_pdf"];
subber.addEvent( \'click' ,function() '
{
subber.set( \'value','Submitting...''\' ).disabled = true;
(function() { subber.disabled = false; subber.set(\'value','submit_pdf'\'); }).delay(10000); // how much time? 10 seconds
});
});
//]]>
</script>';