我按照这段代码在表格中显示我的数据,但是当数据为空时,这段代码就会出错,"error JSON.parse: unexpected at line 1“。请..。请帮我解决这个问题,我想在json数据为空时发出警报 const unit = document.getElementByIdconst nosam = document.getElementById('nosam').v
javascript文件中有这个函数: var ajax= new Ajax.Request("runNeededQueries.phpalert("Could Not Find The Entry With The Specified Primary Key");} );假设这是我的phpphp
header('HTTP/1.0 400 Bad Requ