var oldFiles = new Array();
//oldFiles = '<?php echo $filesJSON;?>';// 这样oldFiles成字符串了,而不是json数据
oldFiles = JSON.parse('<?php echo $filesJSON;?>');// JSON格式即为数组格式

 -------------------------------------------------------------------------------------------------

    var jsonProps = {
        "dispMode":dispMode,
        "autoRun":autoRun,
        "remark":remark
    $.ajax({
         url:"./process/writeTask.php",
         data:"proType=setTask&taskId=" + taskId + "&props=" + JSON.stringify(jsonProps),